Documentation ¶
Index ¶
- func GenerateAuthInfo(clientId, clientSecret, idToken, refreshToken string) *clientcmdapi.AuthInfo
- func GetUserEmail(accessToken string) (string, error)
- func LaunchBrowser(openBrowser bool, oauthUrl, clientID string)
- type APConfig
- type AuthProvider
- type ConfigFile
- type GoogleConfig
- type KubeUserInfo
- type KubectlUser
- type TokenResponse
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAuthInfo ¶
func GenerateAuthInfo(clientId, clientSecret, idToken, refreshToken string) *clientcmdapi.AuthInfo
func GetUserEmail ¶
func LaunchBrowser ¶
Types ¶
type AuthProvider ¶
type ConfigFile ¶
type ConfigFile struct {
Installed *GoogleConfig `json:"installed"`
}
type GoogleConfig ¶
type GoogleConfig struct { ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` }
func ReadConfig ¶
func ReadConfig(path string) (*GoogleConfig, error)
type KubeUserInfo ¶
type KubeUserInfo struct {
AuthProvider *AuthProvider `yaml:"auth-provider"`
}
type KubectlUser ¶
type KubectlUser struct { Name string `yaml:"name"` KubeUserInfo *KubeUserInfo `yaml:"user"` }
type TokenResponse ¶
type TokenResponse struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` IdToken string `json:"id_token"` }
func GetToken ¶
func GetToken(clientID, clientSecret, code string) (*TokenResponse, error)
Get the id_token and refresh_token from google
Click to show internal directories.
Click to hide internal directories.