add write_gcm plugin

This is a problem with our api that we only have only scope and it's
actually good for both read and write.



On Mon, Aug 4, 2014 at 12:51 PM, Jeremy Katz <notifications@github.com>
wrote:

> In src/write_gcm.c:
>
> > +};
> > +typedef struct wg_callback_s wg_callback_t;
> > +
> > +struct wg_memory_s {
> > +  char *memory;
> > +  size_t size;
> > +};
> > +typedef struct wg_memory_s wg_memory_t;
> > +
> > +#if HAVE_LIBSSL
> > +/*base64 encoding of {"alg":"RS256","typ":"JWT"}  */
> > +static const char header64[] = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9";
> > +static const char jwt_claim_fmt[] =
> > +    "{\
> > +\"iss\":\"%s\",\
> > +\"scope\":\"https://www.googleapis.com/auth/monitoring.readonly\",\
>
> This should need write scope, no?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Stackdriver/collectd/pull/2/files#r15776665>.
>