Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONToToken ¶
JSONToToken turns stored JSON into a token.
Types ¶
type PostgresqlStore ¶
type PostgresqlStore struct {
// contains filtered or unexported fields
}
PostgresqlStore is a storage engine that writes to postgres
func NewPostgresqlStore ¶
func NewPostgresqlStore(connStr string) (*PostgresqlStore, error)
NewPostgresqlStore creates new store
type Store ¶
type Store interface { WriteUser(ctx context.Context, user *User) error GetUser(ctx context.Context, id string) (*User, error) Ping(ctx context.Context) error }
Store is the interface for All the store types
type User ¶
type User struct { ID string Username string Token *oauth2.Token Updated time.Time // contains filtered or unexported fields }
User object
Click to show internal directories.
Click to hide internal directories.