Documentation
¶
Index ¶
- Constants
- func IsInProjectDirectory() (bool, error)
- func Login() error
- func Logout() error
- func OpenBrowser(url string) error
- func RefreshWorkspaceCacheForActiveOrg() error
- func RequiredScopes() []string
- func RequiredScopesMin() []string
- func StringInList(a string, list []string) bool
- func WriteCaches() error
- func WriteIndividualWorkspaceCache(orgID string) error
- func WriteTokenToBrevConfigFile(token *Credentials) error
- type Authenticator
- type CacheableWorkspace
- type Client
- func (a *Client) CreateWorkspace(orgID string, name string, gitrepo string) (*Workspace, error)
- func (a *Client) GetMe() (*User, error)
- func (a *Client) GetMeKeys() (*UserKeys, error)
- func (a *Client) GetOrgs() ([]Organization, error)
- func (a *Client) GetWorkspace(wsID string) (*Workspace, error)
- func (a *Client) GetWorkspaceMetaData(wsID string) (*WorkspaceMetaData, error)
- func (a *Client) GetWorkspaces(orgID string) ([]Workspace, error)
- type Credentials
- type OauthToken
- type Organization
- type RequestCreateWorkspace
- type Result
- type SecretStore
- type State
- type User
- type UserKeys
- type Workspace
- type WorkspaceGroupKeys
- type WorkspaceMetaData
Constants ¶
View Source
const (
// namespace used to set/get values from the keychain.
SecretsNamespace = "auth0-cli"
)
Variables ¶
This section is empty.
Functions ¶
func IsInProjectDirectory ¶
func OpenBrowser ¶
open opens the specified URL in the default browser of the user.
func RefreshWorkspaceCacheForActiveOrg ¶
func RefreshWorkspaceCacheForActiveOrg() error
func RequiredScopes ¶
func RequiredScopes() []string
RequiredScopes returns the scopes used for login.
func RequiredScopesMin ¶
func RequiredScopesMin() []string
RequiredScopesMin returns minimum scopes used for login in integration tests.
func StringInList ¶
func WriteCaches ¶
func WriteCaches() error
func WriteTokenToBrevConfigFile ¶
func WriteTokenToBrevConfigFile(token *Credentials) error
Types ¶
type Authenticator ¶
type Authenticator struct {
Audience string
ClientID string
DeviceCodeEndpoint string
OauthTokenEndpoint string
}
type CacheableWorkspace ¶
type CacheableWorkspace struct {
OrgID string `json:"orgID"`
Workspaces []Workspace `json:"workspaces"`
}
func GetWsCacheData ¶
func GetWsCacheData() ([]CacheableWorkspace, error)
type Client ¶
type Client struct {
Key *OauthToken
}
func (*Client) CreateWorkspace ¶
func (*Client) GetOrgs ¶
func (a *Client) GetOrgs() ([]Organization, error)
func (*Client) GetWorkspaceMetaData ¶
func (a *Client) GetWorkspaceMetaData(wsID string) (*WorkspaceMetaData, error)
type Credentials ¶
type OauthToken ¶
type OauthToken struct {
AccessToken string `json:"access_token"`
AuthMethod string `json:"auth_method"`
ExpiresIn int `json:"expires_in"`
IDToken string `json:"id_token"`
RefreshToken string `json:"refresh_token"`
}
func GetToken ¶
func GetToken() (*OauthToken, error)
GetToken reads the previously-persisted token from the filesystem, returning nil for a token if it does not exist
type Organization ¶
func GetActiveOrgContext ¶
func GetActiveOrgContext() (*Organization, error)
func GetOrgCacheData ¶
func GetOrgCacheData() ([]Organization, error)
type RequestCreateWorkspace ¶
type SecretStore ¶
type SecretStore interface {
// Get gets the secret
Get(namespace, key string) (string, error)
// Delete removes the secret
Delete(namespace, key string) error
}
SecretStore provides access to stored sensitive data.
type State ¶
type State struct {
DeviceCode string `json:"device_code"`
UserCode string `json:"user_code"`
VerificationURI string `json:"verification_uri_complete"`
ExpiresIn int `json:"expires_in"`
Interval int `json:"interval"`
}
func (*State) IntervalDuration ¶
type UserKeys ¶
type UserKeys struct {
PrivateKey string `json:"privateKey"`
PublicKey string `json:"publicKey"`
WorkspaceGroups []WorkspaceGroupKeys `json:"workspaceGroups"`
}
func (UserKeys) GetWorkspaceGroupKeysByGroupID ¶
func (u UserKeys) GetWorkspaceGroupKeysByGroupID(groupID string) (*WorkspaceGroupKeys, error)
type Workspace ¶
type Workspace struct {
ID string `json:"id"`
Name string `json:"name"`
WorkspaceGroupID string `json:"workspaceGroupId"`
OrganizationID string `json:"organizationId"`
WorkspaceClassID string `json:"workspaceClassId"`
CreatedByUserID string `json:"createdByUserId"`
DNS string `json:"dns"`
Status string `json:"status"`
Password string `json:"password"`
GitRepo string `json:"gitRepo"`
}
type WorkspaceGroupKeys ¶
type WorkspaceMetaData ¶
type WorkspaceMetaData struct {
PodName string `json:"podName"`
NamespaceName string `json:"namespaceName"`
}
func (WorkspaceMetaData) GetNamespaceName ¶
func (w WorkspaceMetaData) GetNamespaceName() string
func (WorkspaceMetaData) GetPodName ¶
func (w WorkspaceMetaData) GetPodName() string
Click to show internal directories.
Click to hide internal directories.