Documentation
¶
Index ¶
Constants ¶
View Source
const ( APIDefaultURL = "https://api.apono.io" AppDefaultURL = "https://app.apono.io" PortalDefaultURL = "https://portal.apono.io" )
Variables ¶
Functions ¶
func CreateProfileContext ¶ added in v1.1.1
func GetOAuthAuthURL ¶
func GetOAuthTokenURL ¶
Types ¶
type AuthConfig ¶
type AuthConfig struct {
ActiveProfile ProfileName `json:"active_profile"`
Profiles map[ProfileName]SessionConfig `json:"profiles"`
}
type Config ¶
type Config struct {
Auth AuthConfig `json:"auth"`
}
type ProfileName ¶
type ProfileName string
type SessionConfig ¶
type SessionConfig struct {
ClientID string `json:"client_id"`
ApiURL string `json:"api_url"`
AppURL string `json:"app_url"`
PortalURL string `json:"portal_url"`
AccountID string `json:"account_id"`
UserID string `json:"user_id"`
Token oauth2.Token `json:"token"`
CreatedAt time.Time `json:"created_at"`
PersonalToken string `json:"personal_token"`
}
func GetCurrentProfile ¶ added in v1.1.1
func GetCurrentProfile(ctx context.Context) (*SessionConfig, error)
func GetProfileByName ¶ added in v1.1.1
func GetProfileByName(profileName ProfileName) (*SessionConfig, error)
func (SessionConfig) GetOAuth2Config ¶
func (c SessionConfig) GetOAuth2Config() oauth2.Config
Click to show internal directories.
Click to hide internal directories.