<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://code.secondbit.org/ducky/subscriptions/</link>
    <language>en-us</language>

    <title>ducky/subscriptions Changelog</title>
    <description>ducky/subscriptions Changelog</description>
    <item>
    <title>[default] Document our client to make golint happy.</title>
    <guid isPermaLink="true">http://code.secondbit.org/ducky/subscriptions/rev/7eef47ecc01c</guid>
             <link>http://code.secondbit.org/ducky/subscriptions/rev/7eef47ecc01c</link>
    <description>
              <![CDATA[
	<table>
	<tr>
		<th style="text-align:left;">changeset</th>
		<td>7eef47ecc01c</td>
              </tr>
              <tr>
                              <th style="text-align:left;">branch</th>
                              <td>default</td>
              </tr>
              <tr>
                              <th style="text-align:left;">bookmark</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;">tag</th>
		<td>tip</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">user</th>
		<td>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">description</th>
		<td>Document our client to make golint happy.<br/>
<br/>
Take care of all the documentation warnings in the client subpackage, which<br/>
means golint now returns successfully.</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">files</th>
		<td>client/client.go<br />client/subscription.go<br /></td>
	</tr>
	</table>
	]]></description>
    <author>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</author>
    <pubDate>Sun, 04 Oct 2015 22:27:54 -0700</pubDate>
</item>
<item>
    <title>Make api subpackage golint-passing.</title>
    <guid isPermaLink="true">http://code.secondbit.org/ducky/subscriptions/rev/b063bc0a6e84</guid>
             <link>http://code.secondbit.org/ducky/subscriptions/rev/b063bc0a6e84</link>
    <description>
              <![CDATA[
	<table>
	<tr>
		<th style="text-align:left;">changeset</th>
		<td>b063bc0a6e84</td>
              </tr>
              <tr>
                              <th style="text-align:left;">branch</th>
                              <td></td>
              </tr>
              <tr>
                              <th style="text-align:left;">bookmark</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;">tag</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">user</th>
		<td>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">description</th>
		<td>Make api subpackage golint-passing.<br/>
<br/>
Add comments to all the exported functions, methods, and variables in the api<br/>
subpackage, to make golint happy.<br/>
<br/>
Also, make the individual endpoints in the api subpackage unexported, as there's<br/>
no real use case for exporting them. The handlers depend on the placeholders in<br/>
the endpoint, so we need them to be controlled in unison, which means it's<br/>
probably a bad idea to declare the route outside of the API package. And the<br/>
only reason to expose the Handler is so people can declare custom endpoints.</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">files</th>
		<td>api/context_helpers.go<br />api/response.go<br />api/subscription_handlers.go<br /></td>
	</tr>
	</table>
	]]></description>
    <author>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</author>
    <pubDate>Sun, 04 Oct 2015 21:58:07 -0700</pubDate>
</item>
<item>
    <title>Log Postgres test failures more verbosely, fix SubscriptionChange.IsEmpty.</title>
    <guid isPermaLink="true">http://code.secondbit.org/ducky/subscriptions/rev/aab6ba5ae392</guid>
             <link>http://code.secondbit.org/ducky/subscriptions/rev/aab6ba5ae392</link>
    <description>
              <![CDATA[
	<table>
	<tr>
		<th style="text-align:left;">changeset</th>
		<td>aab6ba5ae392</td>
              </tr>
              <tr>
                              <th style="text-align:left;">branch</th>
                              <td></td>
              </tr>
              <tr>
                              <th style="text-align:left;">bookmark</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;">tag</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">user</th>
		<td>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">description</th>
		<td>Log Postgres test failures more verbosely, fix SubscriptionChange.IsEmpty.<br/>
<br/>
SubscriptionChange.IsEmpty() would return false even if no actual database<br/>
operations are going to be performed. This is because we allow information we<br/>
_don't_ store in the database (Stripe source, Stripe email) to be specified in a<br/>
SubscriptionChange object, just so we can easily access them. Then we use the<br/>
Stripe API to store them in Stripe's databases, and turn them into data _we_<br/>
store in our database. Think of them as pre-processed values that are never<br/>
stored raw.<br/>
<br/>
The problem is, we were treating these properties the same as the properties we<br/>
actually stored in the database, and (worse) were running database tests for<br/>
combinations of these properties, which was causing test failures because we<br/>
were trying to update no columns in the database. Whoops.<br/>
<br/>
I removed these properties from the IsEmpty helper, and removed them from the<br/>
code that generates the SubscriptionChange permutations for testing. This allows<br/>
tests to pass, but also stays closer to what the system was designed to do.<br/>
<br/>
In tracking down this bug, I discovered that the logging we had for errors when<br/>
running Postgres tests was inadequate, so I updated the logs when that failure<br/>
occurs while testing Postgres to help surface future failures faster.</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">files</th>
		<td>subscription.go<br />subscription_store_test.go<br /></td>
	</tr>
	</table>
	]]></description>
    <author>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</author>
    <pubDate>Wed, 30 Sep 2015 01:33:53 -0700</pubDate>
</item>
<item>
    <title>Update with comments for all exported functions.</title>
    <guid isPermaLink="true">http://code.secondbit.org/ducky/subscriptions/rev/fb2c0e498e37</guid>
             <link>http://code.secondbit.org/ducky/subscriptions/rev/fb2c0e498e37</link>
    <description>
              <![CDATA[
	<table>
	<tr>
		<th style="text-align:left;">changeset</th>
		<td>fb2c0e498e37</td>
              </tr>
              <tr>
                              <th style="text-align:left;">branch</th>
                              <td></td>
              </tr>
              <tr>
                              <th style="text-align:left;">bookmark</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;">tag</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">user</th>
		<td>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">description</th>
		<td>Update with comments for all exported functions.<br/>
<br/>
We now have golint-approved comments for all the exported functions in the<br/>
subscriptions package.<br/>
<br/>
Next challenge: all the sub-packages!</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">files</th>
		<td>subscription_memstore.go<br />subscription_postgres.go<br /></td>
	</tr>
	</table>
	]]></description>
    <author>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</author>
    <pubDate>Wed, 30 Sep 2015 01:03:39 -0700</pubDate>
</item>
<item>
    <title>Add golint comments.</title>
    <guid isPermaLink="true">http://code.secondbit.org/ducky/subscriptions/rev/1ff031bebf9e</guid>
             <link>http://code.secondbit.org/ducky/subscriptions/rev/1ff031bebf9e</link>
    <description>
              <![CDATA[
	<table>
	<tr>
		<th style="text-align:left;">changeset</th>
		<td>1ff031bebf9e</td>
              </tr>
              <tr>
                              <th style="text-align:left;">branch</th>
                              <td></td>
              </tr>
              <tr>
                              <th style="text-align:left;">bookmark</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;">tag</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">user</th>
		<td>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">description</th>
		<td>Add golint comments.<br/>
<br/>
Comment on some more of our exported types, functions, and variables, both to<br/>
make golint happy and because uncommented code never ever ends well.</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">files</th>
		<td>memstore.go<br />stripe.go<br /></td>
	</tr>
	</table>
	]]></description>
    <author>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</author>
    <pubDate>Sun, 27 Sep 2015 21:20:46 -0700</pubDate>
</item>
<item>
    <title>Fix go vet errors.</title>
    <guid isPermaLink="true">http://code.secondbit.org/ducky/subscriptions/rev/39625b37485d</guid>
             <link>http://code.secondbit.org/ducky/subscriptions/rev/39625b37485d</link>
    <description>
              <![CDATA[
	<table>
	<tr>
		<th style="text-align:left;">changeset</th>
		<td>39625b37485d</td>
              </tr>
              <tr>
                              <th style="text-align:left;">branch</th>
                              <td></td>
              </tr>
              <tr>
                              <th style="text-align:left;">bookmark</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;">tag</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">user</th>
		<td>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">description</th>
		<td>Fix go vet errors.<br/>
<br/>
We had a few logging statements that used placeholders but didn't provide any<br/>
variables to fill them. We now specify the appropriate variables.</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">files</th>
		<td>listeners/subscription_creator/subscription_creator.go<br /></td>
	</tr>
	</table>
	]]></description>
    <author>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</author>
    <pubDate>Sun, 27 Sep 2015 21:20:09 -0700</pubDate>
</item>
<item>
    <title>Add comments, move ChangingSystemProperties to the api package.</title>
    <guid isPermaLink="true">http://code.secondbit.org/ducky/subscriptions/rev/0ae1ff0ee306</guid>
             <link>http://code.secondbit.org/ducky/subscriptions/rev/0ae1ff0ee306</link>
    <description>
              <![CDATA[
	<table>
	<tr>
		<th style="text-align:left;">changeset</th>
		<td>0ae1ff0ee306</td>
              </tr>
              <tr>
                              <th style="text-align:left;">branch</th>
                              <td></td>
              </tr>
              <tr>
                              <th style="text-align:left;">bookmark</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;">tag</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">user</th>
		<td>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">description</th>
		<td>Add comments, move ChangingSystemProperties to the api package.<br/>
<br/>
Add comments to all our exported types and variables in subscription.go, both to<br/>
make golint happy and because it's good to have comments.<br/>
<br/>
Move the subscriptions.ChangingSystemProperties helper to<br/>
api.changingSystemProperties, because it returns API-specific strings and<br/>
there's no real reason it has to be in the subscriptions package--everything it<br/>
needs to work on is exported.</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">files</th>
		<td>api/subscription_handlers.go<br />subscription.go<br /></td>
	</tr>
	</table>
	]]></description>
    <author>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</author>
    <pubDate>Sun, 27 Sep 2015 21:18:45 -0700</pubDate>
</item>
<item>
    <title>Update subscription_creator to use the new strategy.</title>
    <guid isPermaLink="true">http://code.secondbit.org/ducky/subscriptions/rev/2c8250237566</guid>
             <link>http://code.secondbit.org/ducky/subscriptions/rev/2c8250237566</link>
    <description>
              <![CDATA[
	<table>
	<tr>
		<th style="text-align:left;">changeset</th>
		<td>2c8250237566</td>
              </tr>
              <tr>
                              <th style="text-align:left;">branch</th>
                              <td></td>
              </tr>
              <tr>
                              <th style="text-align:left;">bookmark</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;">tag</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">user</th>
		<td>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">description</th>
		<td>Update subscription_creator to use the new strategy.<br/>
<br/>
When creating subscriptions through the client, detect when the returned error<br/>
is saying the account already has a subscription, or the subscription already<br/>
exists in stripe.<br/>
<br/>
Add an UpdateSubscription function that will update a subscription through the<br/>
API.<br/>
<br/>
Update our subscription_creator listener to listen for profile creation and<br/>
login verification messages. This mainly involved fixing the constants (the<br/>
system, model, and topic) that the listener for profile creation was listening<br/>
for. It also meant adding a new updateMessageHandler that listens for login<br/>
verification, tries to create a subscription that has the user ID and email of<br/>
the login that was verified, and if a subscription already exists, updates it<br/>
instead to use the email address that was just verified. This will ensure that<br/>
users get their receipts automatically emailed to them by Stripe.</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">files</th>
		<td>client/subscription.go<br />listeners/subscription_creator/subscription_creator.go<br /></td>
	</tr>
	</table>
	]]></description>
    <author>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</author>
    <pubDate>Sat, 18 Jul 2015 03:28:51 -0400</pubDate>
</item>
<item>
    <title>Return errors from responses in client.</title>
    <guid isPermaLink="true">http://code.secondbit.org/ducky/subscriptions/rev/8eb19bcbf17d</guid>
             <link>http://code.secondbit.org/ducky/subscriptions/rev/8eb19bcbf17d</link>
    <description>
              <![CDATA[
	<table>
	<tr>
		<th style="text-align:left;">changeset</th>
		<td>8eb19bcbf17d</td>
              </tr>
              <tr>
                              <th style="text-align:left;">branch</th>
                              <td></td>
              </tr>
              <tr>
                              <th style="text-align:left;">bookmark</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;">tag</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">user</th>
		<td>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">description</th>
		<td>Return errors from responses in client.<br/>
<br/>
When the client makes a request, non-200 responses _are not_ considered errors.<br/>
So we need to check the response.Errors property, and if it has errors, _then_<br/>
we consider the request to have an error. To make this happen, we created an<br/>
httpErrors type that fulfills the error interface and just wraps the response<br/>
Errors property. Then callers can type-cast it and interrogate it.</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">files</th>
		<td>client/client.go<br /></td>
	</tr>
	</table>
	]]></description>
    <author>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</author>
    <pubDate>Sat, 18 Jul 2015 03:26:56 -0400</pubDate>
</item>
<item>
    <title>Create a listener that will create subscriptions.</title>
    <guid isPermaLink="true">http://code.secondbit.org/ducky/subscriptions/rev/61583c1d3886</guid>
             <link>http://code.secondbit.org/ducky/subscriptions/rev/61583c1d3886</link>
    <description>
              <![CDATA[
	<table>
	<tr>
		<th style="text-align:left;">changeset</th>
		<td>61583c1d3886</td>
              </tr>
              <tr>
                              <th style="text-align:left;">branch</th>
                              <td></td>
              </tr>
              <tr>
                              <th style="text-align:left;">bookmark</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;">tag</th>
		<td></td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">user</th>
		<td>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">description</th>
		<td>Create a listener that will create subscriptions.<br/>
<br/>
We need a listener (as discussed in c4cfceb2f2fb) that will create a<br/>
Subscription whenever an auth.Profile is created. This is the beginning of that<br/>
effort. It hasn't been tested, and all the pieces aren't in place, but it's a<br/>
rough skeleton.<br/>
<br/>
We have a Dockerfile that will correctly build a minimal container for the<br/>
listener.<br/>
<br/>
We have a build-docker.sh script that will correctly build a binary that will be<br/>
used in the Dockerfile.<br/>
<br/>
We have a ca-certificates.crt, which are pulled from Ubuntu, and are necessary<br/>
before we can safely consume SSL endpoints.<br/>
<br/>
We created a small consumer script that listens for events off NSQ, and calls<br/>
the appropriate endpoint for our Subscriptions API. This is untested, and it<br/>
doesn't build at the moment, but that's awaiting changes in the<br/>
code.secondbit.org/auth.hg package.<br/>
<br/>
Finally, we have a wrapper.sh file that will expose the Stripe secret key being<br/>
used from a Kubernetes secret file as an environment variable, instead.</td>
	</tr>
	<tr>
		<th style="text-align:left;vertical-align:top;">files</th>
		<td>listeners/subscription_creator/Dockerfile<br />listeners/subscription_creator/build-docker.sh<br />listeners/subscription_creator/ca-certificates.crt<br />listeners/subscription_creator/subscription_creator.go<br />listeners/subscription_creator/wrapper.sh<br /></td>
	</tr>
	</table>
	]]></description>
    <author>&#80;&#97;&#100;&#100;&#121;&#32;&#60;&#112;&#97;&#100;&#100;&#121;&#64;&#115;&#101;&#99;&#111;&#110;&#100;&#98;&#105;&#116;&#46;&#111;&#114;&#103;&#62;</author>
    <pubDate>Mon, 13 Jul 2015 23:38:22 -0400</pubDate>
</item>

  </channel>
</rss>