Documentation
¶
Index ¶
Constants ¶
View Source
const ( PROVIDER_GITHUB = "github" PROVIDER_DIGITALOCEAN = "digitalocean" )
Variables ¶
View Source
var DOEndpoint = oauth2.Endpoint{
AuthURL: "https://cloud.digitalocean.com/v1/oauth/authorize",
TokenURL: "https://cloud.digitalocean.com/v1/oauth/token",
}
Endpoint is DigitalOcean's OAuth 2.0 endpoint.
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
Click to show internal directories.
Click to hide internal directories.