Versions in this module Expand all Collapse all v0 v0.3.3 Nov 23, 2021 v0.3.2 Nov 23, 2021 v0.3.1 Nov 23, 2021 v0.3.0 Nov 23, 2021 Changes in this version + const SecNamespace + var DefaultApplication = Application + var DefaultApplicationID = "92f59a4yf" + var DefaultApplicationList = []Application + var Ta *time.Time + func DisplayBrevLogo(t *terminal.Terminal) + func GetAccessToken() (string, error) + func GetCachedWorkspaceNames() []string + func GetOrgNames() []string + func GetWorkspaceNames() []string + func GetandDisplaySSHKeys(t *terminal.Terminal) error + func HandleNewClientErrors(err error) error + func InstallVSCodeExtension(t *terminal.Terminal) + func IsInProjectDirectory() (bool, error) + func Login(prompt bool) (*string, error) + func Logout() error + func OpenBrowser(url string) error + func PromptGetInput(pc PromptContent) string + func PromptSelectInput(pc PromptSelectContent) string + func RefreshWorkspaceCacheForActiveOrg() error + func RequiredScopes() []string + func RequiredScopesMin() []string + func StringInList(a string, list []string) bool + func WriteCaches() ([]Organization, []CacheableWorkspace, error) + func WriteIndividualWorkspaceCache(orgID string, wss []Workspace) error + func WriteOrgCache(orgs []Organization) error + func WriteTokenToBrevConfigFile(token *Credentials) error + type Application struct + ID string + Name string + Port int + StartCommand string + Version string + type Authenticator struct + Audience string + ClientID string + DeviceCodeEndpoint string + OauthTokenEndpoint string + func (a *Authenticator) Start(ctx context.Context) (State, error) + func (a *Authenticator) Wait(ctx context.Context, state State) (Result, error) + type CacheableWorkspace struct + OrgID string + Workspaces []Workspace + func GetWsCacheData() ([]CacheableWorkspace, error) + type Client struct + Key *OauthToken + func NewClient() (*Client, error) + func NewCommandClient() (*Client, error) + func (a *Client) CreateUser(identity string) (*User, error) + func (a *Client) CreateWorkspace(orgID string, name string, gitrepo string) (*Workspace, error) + func (a *Client) DeleteWorkspace(wsID string) (*Workspace, error) + func (a *Client) GetMe() (*User, error) + func (a *Client) GetMeKeys() (*UserKeys, error) + func (a *Client) GetMyWorkspaces(orgID string) ([]Workspace, 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) + func (a *Client) ResetWorkspace(wsID string) (*Workspace, error) + func (a *Client) StartWorkspace(wsID string) (*Workspace, error) + func (a *Client) StopWorkspace(wsID string) (*Workspace, error) + type Credentials struct + AccessToken string + ExpiresIn int + IDToken string + RefreshToken string + type NewWorkspace struct + GitRepo string + Name string + func ValidateGitURL(_ *terminal.Terminal, url string) NewWorkspace + type OauthToken struct + AccessToken string + AuthMethod string + ExpiresIn int + IDToken string + RefreshToken string + func GetToken() (*OauthToken, error) + func GetTokenFromBrevConfigFile(fs afero.Fs) (*OauthToken, error) + type Organization struct + ID string + Name string + func GetActiveOrgContext(fs afero.Fs) (*Organization, error) + func GetOrgCacheData() ([]Organization, error) + func GetOrgFromName(name string) (*Organization, error) + type PromptContent struct + Default string + ErrorMsg string + Label string + type PromptSelectContent struct + ErrorMsg string + Items []string + Label string + type RequestCreateWorkspace struct + Applications []Application + GitRepo string + IsStoppable bool + Name string + PrimaryApplicationID string + WorkspaceClassID string + WorkspaceGroupID string + WorkspaceTemplateID string + type Result struct + AccessToken string + Domain string + ExpiresIn int64 + IDToken string + RefreshToken string + Tenant string + type State struct + DeviceCode string + ExpiresIn int + Interval int + UserCode string + VerificationURI string + func (s *State) IntervalDuration() time.Duration + type TempAuth struct + func (t TempAuth) GetAccessToken() (string, error) + type User struct + ID string + PublicKey string + func GetMe() (*User, error) + type UserKeys struct + PrivateKey string + PublicKey string + WorkspaceGroups []WorkspaceGroupKeys + func (u UserKeys) GetWorkspaceGroupKeysByGroupID(groupID string) (*WorkspaceGroupKeys, error) + type Workspace struct + CreatedByUserID string + DNS string + GitRepo string + ID string + Name string + OrganizationID string + Password string + Status string + WorkspaceClassID string + WorkspaceGroupID string + func GetWorkspaceFromName(name string) (*Workspace, error) + func (w Workspace) GetID() string + type WorkspaceGroupKeys struct + APIURL string + CA string + Cert string + GroupID string + type WorkspaceMetaData struct + NamespaceName string + PodName string + func (w WorkspaceMetaData) GetNamespaceName() string + func (w WorkspaceMetaData) GetPodName() string + type WorkspaceWithMeta struct