oauth

package
v0.0.0-...-97b4fb6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROVIDER_GITHUB = "github"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountReader

type AccountReader interface {
	Email() (*string, error)
	Username() (*string, error)
	Name() (*string, error)
	Avatar() (*string, error)
	Data() (interface{}, error)
	Token(authCode string) (*oauth2.Token, error)
}

AccountReader type abstracts how data is retrieved from different providers

func MakeReader

func MakeReader(provider string) (AccountReader, error)

MakeReader creates reader based on requested provider

func MakeReaderWithToken

func MakeReaderWithToken(provider string, token oauth2.Token) (AccountReader, error)

MakeReaderWithToken creates reader based on requested provider with given token

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL