Skip to content

Instantly share code, notes, and snippets.

View patrick91's full-sized avatar

Patrick Arminio patrick91

View GitHub Profile
import * as React from 'react';
import styled from 'styled-components';
import { ComponentClass, StatelessComponent } from 'react';
export type Component<P> = ComponentClass<P> | StatelessComponent<P>;
interface FooProps {
message: string,
primary: boolean,
};
@patrick91
patrick91 / config.go
Last active September 15, 2018 11:43 — forked from agtorre/config.go
Store OAuth2 Token Using Datastore
// Config is a custom oauth2 config that is used to store the token
// in the datastore
type Config struct {
*oauth2.Config
}
// StoreToken is called when exchanging the token and saves the token
// in the datastore
func (c *Config) StoreToken(ctx context.Context, token *oauth2.Token) error {
log.Infof(ctx, "storing the token")