Documentation ¶
Index ¶
Constants ¶
View Source
const ( ClientID string = "" CallbackUrl string = "/google/callback" ListenPort int = 9096 GoogleAuthURL string = "https://accounts.google.com/o/oauth2/auth/oauthchooseaccount" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultGoogleAccount ¶
type DefaultGoogleAccount struct {
// contains filtered or unexported fields
}
type Interface ¶
type Interface interface { // Login Call Google Account Oauth and get token code which returned. Login(ctx context.Context) (*AuthInfo, error) }
func NewGoogleAccount ¶
func NewGoogleAccount(opts ...OptionFunc) Interface
NewGoogleAccount Construction function for Google Account Interface, use factory method pattern.
type OptionFunc ¶
func WithClientID ¶
func WithClientID(clientID string) OptionFunc
func WithRedirectURL ¶
func WithRedirectURL(redirectURL string) OptionFunc
Click to show internal directories.
Click to hide internal directories.