Documentation ¶
Index ¶
- Constants
- Variables
- func FilterForUserWorkspaces(workspaces []entity.Workspace, userID string) []entity.Workspace
- func GetBrevDirectory() string
- func GetDefaultOrNilOrg(orgs []entity.Organization) *entity.Organization
- func IsNetwork404Or403Error(err error) bool
- func IsNetworkErrorWithStatus(err error, statusCodes []int) bool
- func NewRestyClient(brevAPIURL string) *resty.Client
- func VerifyPrivateKey(key []byte) error
- type Auth
- type AuthHTTPClient
- type AuthHTTPStore
- func (s AuthHTTPStore) ApproveUserByID(userID string) (*entity.User, error)
- func (s AuthHTTPStore) CreateInviteLink(organizationID string) (string, error)
- func (s AuthHTTPStore) CreateOrganization(req CreateOrganizationRequest) (*entity.Organization, error)
- func (s AuthHTTPStore) CreateSecret(req CreateSecretRequest) (*CreateSecretRequest, error)
- func (s AuthHTTPStore) CreateWorkspace(organizationID string, options *CreateWorkspacesOptions) (*entity.Workspace, error)
- func (s AuthHTTPStore) DeleteWorkspace(workspaceID string) (*entity.Workspace, error)
- func (s AuthHTTPStore) GetActiveOrganizationOrDefault() (*entity.Organization, error)
- func (s AuthHTTPStore) GetActiveOrganizationOrNil() (*entity.Organization, error)
- func (s AuthHTTPStore) GetAllWorkspaces(options *GetWorkspacesOptions) ([]entity.Workspace, error)
- func (s AuthHTTPStore) GetContextWorkspaces() ([]entity.Workspace, error)
- func (s AuthHTTPStore) GetCurrentUser() (*entity.User, error)
- func (s AuthHTTPStore) GetCurrentUserID() (string, error)
- func (s AuthHTTPStore) GetCurrentUserKeys() (*entity.UserKeys, error)
- func (s AuthHTTPStore) GetEnvSetupParams(workspaceID string) (*SetupParamsV0, error)
- func (s AuthHTTPStore) GetNetwork(networkID string) (*GetNetworkResponse, error)
- func (s AuthHTTPStore) GetNetworkAuthKey() (*GetAuthKeyResponse, error)
- func (s AuthHTTPStore) GetNetworkAuthKeyByNetworkID(networkID string, ephemeral bool) (*GetAuthKeyResponse, error)
- func (s AuthHTTPStore) GetOrganization(organizationID string) (*entity.Organization, error)
- func (s AuthHTTPStore) GetOrganizations(options *GetOrganizationsOptions) ([]entity.Organization, error)
- func (s AuthHTTPStore) GetSetupScriptContentsByURL(url string) (string, error)
- func (s AuthHTTPStore) GetUsers(queryParams map[string]string) ([]entity.User, error)
- func (s *AuthHTTPStore) GetWindowsDir() (string, error)
- func (s AuthHTTPStore) GetWorkspace(workspaceID string) (*entity.Workspace, error)
- func (s AuthHTTPStore) GetWorkspaceByNameOrID(orgID string, nameOrID string) ([]entity.Workspace, error)
- func (s AuthHTTPStore) GetWorkspaceGroups(organizationID string) ([]entity.WorkspaceGroup, error)
- func (s AuthHTTPStore) GetWorkspaceMetaData(workspaceID string) (*entity.WorkspaceMetaData, error)
- func (s AuthHTTPStore) GetWorkspaces(organizationID string, options *GetWorkspacesOptions) ([]entity.Workspace, error)
- func (s AuthHTTPStore) ModifyWorkspace(workspaceID string, options *ModifyWorkspaceRequest) (*entity.Workspace, error)
- func (s AuthHTTPStore) NewAuthHTTPStore() *AuthHTTPStore
- func (s AuthHTTPStore) RegisterNode(publicKey string) error
- func (s AuthHTTPStore) ResetWorkspace(workspaceID string) (*entity.Workspace, error)
- func (s AuthHTTPStore) SetDefaultOrganization(org *entity.Organization) error
- func (s *AuthHTTPStore) SetForbiddenStatusRetryHandler(handler func() error) error
- func (s AuthHTTPStore) StartWorkspace(workspaceID string) (*entity.Workspace, error)
- func (s AuthHTTPStore) StopWorkspace(workspaceID string) (*entity.Workspace, error)
- func (s AuthHTTPStore) UpdateUser(userID string, updatedUser *entity.UpdateUser) (*entity.User, error)
- func (s *AuthHTTPStore) WithStaticHeader(header string, value string) *AuthHTTPStore
- type BasicStore
- type BrevDeployError
- type BrevDeployErrorList
- type CreateOrganizationRequest
- type CreateSecretRequest
- type CreateWorkspacesOptions
- func (c *CreateWorkspacesOptions) WithClassID(classID string) *CreateWorkspacesOptions
- func (c *CreateWorkspacesOptions) WithCustomSetupRepo(gitRepo string, path string) *CreateWorkspacesOptions
- func (c *CreateWorkspacesOptions) WithGitRepo(gitRepo string) *CreateWorkspacesOptions
- func (c *CreateWorkspacesOptions) WithInstanceType(instanceType string) *CreateWorkspacesOptions
- func (c *CreateWorkspacesOptions) WithStartupScript(startupScript string) *CreateWorkspacesOptions
- func (c *CreateWorkspacesOptions) WithWorkspaceClassID(workspaceClassID string) *CreateWorkspacesOptions
- type Dependencies
- type DestConfig
- type DestType
- type FileStore
- func (f FileStore) AppendString(path string, content string) error
- func (f FileStore) BuildBrevHome() error
- func (f FileStore) ChownFilePathToUser(filePath string) error
- func (f FileStore) ClearDefaultOrganization() error
- func (f FileStore) CopyBin(targetBin string) error
- func (f FileStore) CreateNewSSHConfigBackup() error
- func (f FileStore) DeleteAuthTokens() error
- func (f FileStore) DoesJetbrainsFilePathExist() (bool, error)
- func (f FileStore) DownloadBinary(url string, target string) error
- func (f FileStore) FileExists(filepath string) (bool, error)
- func (f FileStore) GetAuthTokens() (*entity.AuthTokens, error)
- func (f FileStore) GetBrevHomePath() (string, error)
- func (f FileStore) GetBrevSSHConfigPath() (string, error)
- func (f FileStore) GetCurrentWorkspaceGroupID() (string, error)
- func (f FileStore) GetCurrentWorkspaceID() (string, error)
- func (f FileStore) GetCurrentWorkspaceMeta() (*WorkspaceMeta, error)
- func (f FileStore) GetCurrentWorkspaceServiceToken() (string, error)
- func (f FileStore) GetDependenciesForImport(path string) (*Dependencies, error)
- func (f FileStore) GetDotGitConfigFile(path string) (string, error)
- func (f FileStore) GetFileAsString(path string) (string, error)
- func (f FileStore) GetJetBrainsConfig() (string, error)
- func (f FileStore) GetJetBrainsConfigPath() (string, error)
- func (f FileStore) GetOSUser() string
- func (f FileStore) GetOrCreateFile(path string) (afero.File, error)
- func (f FileStore) GetOrCreateSetupLogFile(path string) (afero.File, error)
- func (f FileStore) GetPrivateKeyPath() (string, error)
- func (f FileStore) GetServerSockFile() string
- func (f FileStore) GetSetupParams() (*SetupParamsV0, error)
- func (f FileStore) GetSetupScriptPath() string
- func (f FileStore) GetUserSSHConfig() (string, error)
- func (f FileStore) GetUserSSHConfigPath() (string, error)
- func (f FileStore) GetWSLHostBrevSSHConfigPath() (string, error)
- func (f FileStore) GetWSLHostUserSSHConfigPath() (string, error)
- func (f FileStore) GetWSLUserSSHConfig() (string, error)
- func (f *FileStore) GetWindowsDir() (string, error)
- func (f FileStore) IsWorkspace() (bool, error)
- func (f FileStore) ReadEmail() (string, error)
- func (f FileStore) Remove(target string) error
- func (f FileStore) SaveAuthTokens(token entity.AuthTokens) error
- func (f FileStore) UserHomeDir() (string, error)
- func (f *FileStore) WithAuthHTTPClient(c *AuthHTTPClient) *AuthHTTPStore
- func (f *FileStore) WithNoAuthHTTPClient(c *NoAuthHTTPClient) *NoAuthHTTPStore
- func (f *FileStore) WithUserHomeDirGetter(userHomeDirGetter func() (string, error)) *FileStore
- func (f *FileStore) WithUserID(userID string) (*FileStore, error)
- func (f FileStore) WriteBrevSSHConfig(config string) error
- func (f FileStore) WriteBrevSSHConfigWSL(config string) error
- func (f FileStore) WriteEmail(email string) error
- func (f FileStore) WriteJetBrainsConfig(config string) error
- func (f FileStore) WritePrivateKey(pem string) error
- func (f FileStore) WriteSetupScript(script string) error
- func (f FileStore) WriteString(path, data string) error
- func (f FileStore) WriteUserSSHConfig(config string) error
- func (f FileStore) WriteWSLUserSSHConfig(config string) error
- type GetAuthKeyResponse
- type GetNetworkResponse
- type GetOrganizationsOptions
- type GetWorkspacesOptions
- type GithubReleaseMetadata
- type HTTPResponseError
- type HierarchyType
- type IDEConfigs
- type IDEName
- type IdeConfig
- type InstanceIdentityDocument
- type KeyPair
- type ModifyWorkspaceRequest
- type NoAuthHTTPClient
- type NoAuthHTTPStore
- func (n NoAuthHTTPStore) CreateUser(identityToken string) (*entity.User, error)
- func (n *NoAuthHTTPStore) GetInstanceIdentity() (*InstanceIdentityDocument, error)
- func (n *NoAuthHTTPStore) GetInstanceType() (string, error)
- func (n NoAuthHTTPStore) GetLatestReleaseMetadata() (*GithubReleaseMetadata, error)
- func (n NoAuthHTTPStore) GetSetupScriptContentsByURL(url string) (string, error)
- func (n *NoAuthHTTPStore) GetWindowsDir() (string, error)
- func (n NoAuthHTTPStore) Healthcheck() error
- func (n NoAuthHTTPStore) NewNoAuthHTTPStore() *NoAuthHTTPStore
- func (n NoAuthHTTPStore) RecordAutoStop(recordAutopstopBody RecordAutopstopBody) error
- func (n NoAuthHTTPStore) RegisterNotificationEmail(email string) error
- func (n *NoAuthHTTPStore) WithAuth(auth Auth) *AuthHTTPStore
- func (n *NoAuthHTTPStore) WithAuthHTTPClient(c *AuthHTTPClient) *AuthHTTPStore
- type RecordAutopstopBody
- type SecretReqDest
- type SecretReqSrc
- type SetupParamsV0
- type SrcConfig
- type SrcType
- type UserCreateResponse
- type WorkspaceMeta
Constants ¶
const (
JetbrainsGatewayConfigFileName = "sshConfigs.xml"
)
Variables ¶
var ( DefaultWorkspaceClassID = config.GlobalConfig.GetDefaultWorkspaceClass() UserWorkspaceClassID = "2x8" DevWorkspaceClassID = "4x16" DefaultWorkspaceTemplateID = config.GlobalConfig.GetDefaultWorkspaceTemplate() UserWorkspaceTemplateID = "4nbb4lg2s" DevWorkspaceTemplateID = "v7nd45zsc" )
var ( DefaultApplicationID = "92f59a4yf" DefaultApplication = entity.Application{ ID: DefaultApplicationID, Name: "VSCode", Port: 22778, StartCommand: "", Version: "1.57.1", } )
var DefaultApplicationList = []entity.Application{DefaultApplication}
Functions ¶
func FilterForUserWorkspaces ¶ added in v0.6.63
func GetBrevDirectory ¶ added in v0.6.24
func GetBrevDirectory() string
func GetDefaultOrNilOrg ¶
func GetDefaultOrNilOrg(orgs []entity.Organization) *entity.Organization
func IsNetwork404Or403Error ¶ added in v0.6.60
func IsNetworkErrorWithStatus ¶ added in v0.6.60
func NewRestyClient ¶
func VerifyPrivateKey ¶ added in v0.5.0
Types ¶
type AuthHTTPClient ¶
type AuthHTTPClient struct {
// contains filtered or unexported fields
}
func NewAuthHTTPClient ¶
func NewAuthHTTPClient(auth Auth, brevAPIURL string) *AuthHTTPClient
type AuthHTTPStore ¶
type AuthHTTPStore struct { NoAuthHTTPStore BasicStore // contains filtered or unexported fields }
func (AuthHTTPStore) ApproveUserByID ¶ added in v0.5.0
func (s AuthHTTPStore) ApproveUserByID(userID string) (*entity.User, error)
func (AuthHTTPStore) CreateInviteLink ¶ added in v0.6.18
func (s AuthHTTPStore) CreateInviteLink(organizationID string) (string, error)
func (AuthHTTPStore) CreateOrganization ¶
func (s AuthHTTPStore) CreateOrganization(req CreateOrganizationRequest) (*entity.Organization, error)
func (AuthHTTPStore) CreateSecret ¶
func (s AuthHTTPStore) CreateSecret(req CreateSecretRequest) (*CreateSecretRequest, error)
func (AuthHTTPStore) CreateWorkspace ¶ added in v0.4.0
func (s AuthHTTPStore) CreateWorkspace(organizationID string, options *CreateWorkspacesOptions) (*entity.Workspace, error)
func (AuthHTTPStore) DeleteWorkspace ¶ added in v0.4.0
func (s AuthHTTPStore) DeleteWorkspace(workspaceID string) (*entity.Workspace, error)
func (AuthHTTPStore) GetActiveOrganizationOrDefault ¶
func (s AuthHTTPStore) GetActiveOrganizationOrDefault() (*entity.Organization, error)
returns the 'set'/active organization or the default one or nil if no orgs exist
func (AuthHTTPStore) GetActiveOrganizationOrNil ¶
func (s AuthHTTPStore) GetActiveOrganizationOrNil() (*entity.Organization, error)
returns the 'set'/active organization or nil if not set
func (AuthHTTPStore) GetAllWorkspaces ¶
func (s AuthHTTPStore) GetAllWorkspaces(options *GetWorkspacesOptions) ([]entity.Workspace, error)
func (AuthHTTPStore) GetContextWorkspaces ¶ added in v0.6.0
func (s AuthHTTPStore) GetContextWorkspaces() ([]entity.Workspace, error)
get user workspaces in org, like brev ls
func (AuthHTTPStore) GetCurrentUser ¶
func (s AuthHTTPStore) GetCurrentUser() (*entity.User, error)
func (AuthHTTPStore) GetCurrentUserID ¶ added in v0.6.38
func (s AuthHTTPStore) GetCurrentUserID() (string, error)
func (AuthHTTPStore) GetCurrentUserKeys ¶
func (s AuthHTTPStore) GetCurrentUserKeys() (*entity.UserKeys, error)
func (AuthHTTPStore) GetEnvSetupParams ¶ added in v0.6.99
func (s AuthHTTPStore) GetEnvSetupParams(workspaceID string) (*SetupParamsV0, error)
func (AuthHTTPStore) GetNetwork ¶ added in v0.6.24
func (s AuthHTTPStore) GetNetwork(networkID string) (*GetNetworkResponse, error)
func (AuthHTTPStore) GetNetworkAuthKey ¶ added in v0.6.24
func (s AuthHTTPStore) GetNetworkAuthKey() (*GetAuthKeyResponse, error)
func (AuthHTTPStore) GetNetworkAuthKeyByNetworkID ¶ added in v0.6.24
func (s AuthHTTPStore) GetNetworkAuthKeyByNetworkID(networkID string, ephemeral bool) (*GetAuthKeyResponse, error)
func (AuthHTTPStore) GetOrganization ¶ added in v0.6.24
func (s AuthHTTPStore) GetOrganization(organizationID string) (*entity.Organization, error)
func (AuthHTTPStore) GetOrganizations ¶
func (s AuthHTTPStore) GetOrganizations(options *GetOrganizationsOptions) ([]entity.Organization, error)
func (AuthHTTPStore) GetSetupScriptContentsByURL ¶ added in v0.6.22
func (s AuthHTTPStore) GetSetupScriptContentsByURL(url string) (string, error)
func (*AuthHTTPStore) GetWindowsDir ¶ added in v0.6.162
func (s *AuthHTTPStore) GetWindowsDir() (string, error)
func (AuthHTTPStore) GetWorkspace ¶
func (s AuthHTTPStore) GetWorkspace(workspaceID string) (*entity.Workspace, error)
func (AuthHTTPStore) GetWorkspaceByNameOrID ¶ added in v0.6.60
func (AuthHTTPStore) GetWorkspaceGroups ¶ added in v0.6.99
func (s AuthHTTPStore) GetWorkspaceGroups(organizationID string) ([]entity.WorkspaceGroup, error)
func (AuthHTTPStore) GetWorkspaceMetaData ¶
func (s AuthHTTPStore) GetWorkspaceMetaData(workspaceID string) (*entity.WorkspaceMetaData, error)
func (AuthHTTPStore) GetWorkspaces ¶
func (s AuthHTTPStore) GetWorkspaces(organizationID string, options *GetWorkspacesOptions) ([]entity.Workspace, error)
func (AuthHTTPStore) ModifyWorkspace ¶ added in v0.6.97
func (s AuthHTTPStore) ModifyWorkspace(workspaceID string, options *ModifyWorkspaceRequest) (*entity.Workspace, error)
func (AuthHTTPStore) NewAuthHTTPStore ¶
func (s AuthHTTPStore) NewAuthHTTPStore() *AuthHTTPStore
Used if need new instance to customize settings
func (AuthHTTPStore) RegisterNode ¶ added in v0.6.20
func (s AuthHTTPStore) RegisterNode(publicKey string) error
func (AuthHTTPStore) ResetWorkspace ¶ added in v0.4.0
func (s AuthHTTPStore) ResetWorkspace(workspaceID string) (*entity.Workspace, error)
func (AuthHTTPStore) SetDefaultOrganization ¶ added in v0.4.0
func (s AuthHTTPStore) SetDefaultOrganization(org *entity.Organization) error
func (*AuthHTTPStore) SetForbiddenStatusRetryHandler ¶ added in v0.4.0
func (s *AuthHTTPStore) SetForbiddenStatusRetryHandler(handler func() error) error
func (AuthHTTPStore) StartWorkspace ¶ added in v0.4.0
func (s AuthHTTPStore) StartWorkspace(workspaceID string) (*entity.Workspace, error)
func (AuthHTTPStore) StopWorkspace ¶
func (s AuthHTTPStore) StopWorkspace(workspaceID string) (*entity.Workspace, error)
func (AuthHTTPStore) UpdateUser ¶ added in v0.5.0
func (s AuthHTTPStore) UpdateUser(userID string, updatedUser *entity.UpdateUser) (*entity.User, error)
func (*AuthHTTPStore) WithStaticHeader ¶ added in v0.6.24
func (s *AuthHTTPStore) WithStaticHeader(header string, value string) *AuthHTTPStore
type BasicStore ¶
type BasicStore struct {
// contains filtered or unexported fields
}
func NewBasicStore ¶
func NewBasicStore() *BasicStore
func (BasicStore) GetWSLHostHomeDir ¶ added in v0.6.162
func (b BasicStore) GetWSLHostHomeDir() (string, error)
look in path on wsl to find out which user is the user on windows that is running wsl PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Users/15854/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/15854/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin
func (*BasicStore) WithEnvGetter ¶ added in v0.6.168
func (b *BasicStore) WithEnvGetter(f func(string) string) *BasicStore
func (*BasicStore) WithFileSystem ¶
func (b *BasicStore) WithFileSystem(fs afero.Fs) *FileStore
type BrevDeployError ¶ added in v0.6.58
type BrevDeployErrorList ¶ added in v0.6.58
type BrevDeployErrorList struct {
Errors []BrevDeployError
}
type CreateOrganizationRequest ¶
type CreateOrganizationRequest struct {
Name string `json:"name"`
}
type CreateSecretRequest ¶
type CreateSecretRequest struct { Name string `json:"name"` HierarchyType HierarchyType `json:"hierarchyType"` HierarchyID string `json:"hierarchyID"` Src SecretReqSrc `json:"src"` Dest SecretReqDest `json:"dest"` }
type CreateWorkspacesOptions ¶ added in v0.4.0
type CreateWorkspacesOptions struct { Name string `json:"name"` WorkspaceGroupID string `json:"workspaceGroupId"` WorkspaceClassID string `json:"workspaceClassId"` InstanceType string `json:"instanceType"` IsStoppable *bool `json:"isStoppable,omitempty"` WorkspaceTemplateID string `json:"workspaceTemplateId"` PrimaryApplicationID string `json:"primaryApplicationId"` Applications []entity.Application `json:"applications"` StartupScript string `json:"startupScript"` GitRepo string `json:"gitRepo"` InitBranch string `json:"initBranch"` StartupScriptPath string `json:"startupScriptPath"` DotBrevPath string `json:"dotBrevPath"` IDEConfig *entity.IDEConfig `json:"ideConfig"` Repos entity.ReposV0 `json:"repos"` Execs entity.ExecsV0 `json:"execs"` }
func NewCreateWorkspacesOptions ¶ added in v0.4.0
func NewCreateWorkspacesOptions(clusterID, name string) *CreateWorkspacesOptions
func (*CreateWorkspacesOptions) WithClassID ¶ added in v0.6.19
func (c *CreateWorkspacesOptions) WithClassID(classID string) *CreateWorkspacesOptions
func (*CreateWorkspacesOptions) WithCustomSetupRepo ¶ added in v0.6.69
func (c *CreateWorkspacesOptions) WithCustomSetupRepo(gitRepo string, path string) *CreateWorkspacesOptions
func (*CreateWorkspacesOptions) WithGitRepo ¶ added in v0.4.0
func (c *CreateWorkspacesOptions) WithGitRepo(gitRepo string) *CreateWorkspacesOptions
func (*CreateWorkspacesOptions) WithInstanceType ¶ added in v0.6.96
func (c *CreateWorkspacesOptions) WithInstanceType(instanceType string) *CreateWorkspacesOptions
func (*CreateWorkspacesOptions) WithStartupScript ¶ added in v0.6.16
func (c *CreateWorkspacesOptions) WithStartupScript(startupScript string) *CreateWorkspacesOptions
func (*CreateWorkspacesOptions) WithWorkspaceClassID ¶ added in v0.5.0
func (c *CreateWorkspacesOptions) WithWorkspaceClassID(workspaceClassID string) *CreateWorkspacesOptions
type Dependencies ¶ added in v0.6.16
type DestConfig ¶
type FileStore ¶
func (FileStore) AppendString ¶ added in v0.6.129
append a string to a file
func (FileStore) BuildBrevHome ¶ added in v0.6.24
func (FileStore) ChownFilePathToUser ¶ added in v0.6.97
func (FileStore) ClearDefaultOrganization ¶ added in v0.6.29
func (FileStore) CopyBin ¶ added in v0.6.22
CopyBin copies the running executeable to a target, creating directories as needed
func (FileStore) CreateNewSSHConfigBackup ¶
func (FileStore) DeleteAuthTokens ¶ added in v0.4.0
func (FileStore) DoesJetbrainsFilePathExist ¶ added in v0.6.3
func (FileStore) DownloadBinary ¶ added in v0.6.106
download a file from a url to a target path
func (FileStore) FileExists ¶ added in v0.5.0
func (FileStore) GetAuthTokens ¶ added in v0.4.0
func (f FileStore) GetAuthTokens() (*entity.AuthTokens, error)
func (FileStore) GetBrevHomePath ¶ added in v0.6.24
func (FileStore) GetBrevSSHConfigPath ¶ added in v0.6.0
func (FileStore) GetCurrentWorkspaceGroupID ¶ added in v0.6.24
func (FileStore) GetCurrentWorkspaceID ¶ added in v0.6.20
GetCurrentWorkspaceID will return an empty string when not in a brev workspace, and otherwise return its id
func (FileStore) GetCurrentWorkspaceMeta ¶ added in v0.6.24
func (f FileStore) GetCurrentWorkspaceMeta() (*WorkspaceMeta, error)
func (FileStore) GetCurrentWorkspaceServiceToken ¶ added in v0.6.24
func (FileStore) GetDependenciesForImport ¶ added in v0.6.16
func (f FileStore) GetDependenciesForImport(path string) (*Dependencies, error)
func (FileStore) GetDotGitConfigFile ¶ added in v0.6.16
func (FileStore) GetFileAsString ¶ added in v0.6.47
func (FileStore) GetJetBrainsConfig ¶ added in v0.5.0
func (FileStore) GetJetBrainsConfigPath ¶ added in v0.5.0
func (FileStore) GetOrCreateFile ¶ added in v0.5.0
func (FileStore) GetOrCreateSetupLogFile ¶ added in v0.6.97
needs a functions that will: given a path: will create the path and parent dirs if not exists as store user will create file if not exists as store user, as well open it as read write for appending then return the file so it can be used as an io multiwriter with stdout call it GetOrCreateSetupLogFile(path string) (io.ReaderWriter error)
func (FileStore) GetPrivateKeyPath ¶ added in v0.6.0
func (FileStore) GetServerSockFile ¶ added in v0.6.24
func (FileStore) GetSetupParams ¶ added in v0.6.38
func (f FileStore) GetSetupParams() (*SetupParamsV0, error)
func (FileStore) GetSetupScriptPath ¶ added in v0.6.38
func (FileStore) GetUserSSHConfig ¶ added in v0.6.0
!! need something to resolve file path of user ssh
func (FileStore) GetUserSSHConfigPath ¶ added in v0.6.0
func (FileStore) GetWSLHostBrevSSHConfigPath ¶ added in v0.6.169
func (FileStore) GetWSLHostUserSSHConfigPath ¶ added in v0.6.162
func (FileStore) GetWSLUserSSHConfig ¶ added in v0.6.169
func (*FileStore) GetWindowsDir ¶ added in v0.6.168
func (FileStore) IsWorkspace ¶ added in v0.6.63
func (FileStore) SaveAuthTokens ¶ added in v0.4.0
func (f FileStore) SaveAuthTokens(token entity.AuthTokens) error
func (FileStore) UserHomeDir ¶ added in v0.6.24
func (*FileStore) WithAuthHTTPClient ¶
func (f *FileStore) WithAuthHTTPClient(c *AuthHTTPClient) *AuthHTTPStore
func (*FileStore) WithNoAuthHTTPClient ¶
func (f *FileStore) WithNoAuthHTTPClient(c *NoAuthHTTPClient) *NoAuthHTTPStore
func (*FileStore) WithUserHomeDirGetter ¶ added in v0.6.169
func (*FileStore) WithUserID ¶ added in v0.6.24
func (FileStore) WriteBrevSSHConfig ¶ added in v0.6.0
func (FileStore) WriteBrevSSHConfigWSL ¶ added in v0.6.167
func (FileStore) WriteEmail ¶ added in v0.6.121
func (FileStore) WriteJetBrainsConfig ¶ added in v0.5.0
func (FileStore) WritePrivateKey ¶
func (FileStore) WriteSetupScript ¶ added in v0.6.38
func (FileStore) WriteString ¶ added in v0.6.22
func (FileStore) WriteUserSSHConfig ¶ added in v0.6.0
func (FileStore) WriteWSLUserSSHConfig ¶ added in v0.6.169
type GetAuthKeyResponse ¶ added in v0.6.24
type GetNetworkResponse ¶ added in v0.6.24
type GetNetworkResponse struct { ID string `json:"id"` CreatedAt string `json:"createdAt"` DNSSearchDomains []string `json:"dnsSearchDomains"` Name string `json:"name"` OrginizationID string `json:"organizationId"` UserID string `json:"userId"` ExternalIdentifier string `json:"externalIdentifier"` }
type GetOrganizationsOptions ¶ added in v0.4.0
type GetOrganizationsOptions struct {
Name string
}
type GetWorkspacesOptions ¶
type GithubReleaseMetadata ¶ added in v0.4.0
type HTTPResponseError ¶
func NewHTTPResponseError ¶
func NewHTTPResponseError(response *resty.Response) *HTTPResponseError
func (HTTPResponseError) Error ¶
func (e HTTPResponseError) Error() string
type HierarchyType ¶
type HierarchyType string
const ( Org HierarchyType = "org" User HierarchyType = "user" )
type IDEConfigs ¶ added in v0.6.68
type IdeConfig ¶ added in v0.6.68
type IdeConfig struct {
ExtensionIDs []string `json:"extensionIds"`
}
type InstanceIdentityDocument ¶ added in v0.6.127
type ModifyWorkspaceRequest ¶ added in v0.6.98
type ModifyWorkspaceRequest struct { WorkspaceClassID string `json:"workspaceClassId,omitempty"` IsStoppable bool `json:"isStoppable,omitempty"` StartupScriptPath string `json:"startupScriptPath,omitempty"` Name string `json:"name,omitempty"` IDEConfig *entity.IDEConfig `json:"ideConfig,omitempty"` Repos entity.ReposV0 `json:"repos,omitempty"` Execs entity.ExecsV0 `json:"execs,omitempty"` ReposV1 *entity.ReposV1 `json:"reposV1,omitempty"` ExecsV1 *entity.ExecsV1 `json:"execsV1,omitempty"` InstanceType string `json:"instanceType,omitempty"` }
type NoAuthHTTPClient ¶
type NoAuthHTTPClient struct {
// contains filtered or unexported fields
}
func NewNoAuthHTTPClient ¶
func NewNoAuthHTTPClient(brevAPIURL string) *NoAuthHTTPClient
type NoAuthHTTPStore ¶
type NoAuthHTTPStore struct { FileStore BasicStore // contains filtered or unexported fields }
func (NoAuthHTTPStore) CreateUser ¶
func (n NoAuthHTTPStore) CreateUser(identityToken string) (*entity.User, error)
func (*NoAuthHTTPStore) GetInstanceIdentity ¶ added in v0.6.127
func (n *NoAuthHTTPStore) GetInstanceIdentity() (*InstanceIdentityDocument, error)
func (*NoAuthHTTPStore) GetInstanceType ¶ added in v0.6.121
func (n *NoAuthHTTPStore) GetInstanceType() (string, error)
func (NoAuthHTTPStore) GetLatestReleaseMetadata ¶ added in v0.4.0
func (n NoAuthHTTPStore) GetLatestReleaseMetadata() (*GithubReleaseMetadata, error)
func (NoAuthHTTPStore) GetSetupScriptContentsByURL ¶ added in v0.6.22
func (n NoAuthHTTPStore) GetSetupScriptContentsByURL(url string) (string, error)
func (*NoAuthHTTPStore) GetWindowsDir ¶ added in v0.6.162
func (n *NoAuthHTTPStore) GetWindowsDir() (string, error)
func (NoAuthHTTPStore) Healthcheck ¶ added in v0.6.13
func (n NoAuthHTTPStore) Healthcheck() error
func (NoAuthHTTPStore) NewNoAuthHTTPStore ¶
func (n NoAuthHTTPStore) NewNoAuthHTTPStore() *NoAuthHTTPStore
Used if need new instance to customize settings
func (NoAuthHTTPStore) RecordAutoStop ¶ added in v0.6.120
func (n NoAuthHTTPStore) RecordAutoStop( recordAutopstopBody RecordAutopstopBody, ) error
func (NoAuthHTTPStore) RegisterNotificationEmail ¶ added in v0.6.120
func (n NoAuthHTTPStore) RegisterNotificationEmail(email string) error
func (*NoAuthHTTPStore) WithAuth ¶
func (n *NoAuthHTTPStore) WithAuth(auth Auth) *AuthHTTPStore
func (*NoAuthHTTPStore) WithAuthHTTPClient ¶
func (n *NoAuthHTTPStore) WithAuthHTTPClient(c *AuthHTTPClient) *AuthHTTPStore
type RecordAutopstopBody ¶ added in v0.6.120
type SecretReqDest ¶
type SecretReqDest struct { Type DestType `json:"type"` Config DestConfig `json:"config"` }
type SecretReqSrc ¶
type SetupParamsV0 ¶ added in v0.6.38
type SetupParamsV0 struct { WorkspaceHost uri.Host `json:"workspaceHost"` WorkspacePort int `json:"workspacePort"` WorkspaceBaseRepo string `json:"workspaceBaseRepo"` WorkspaceProjectRepo string `json:"workspaceProjectRepo"` WorkspaceProjectRepoBranch string `json:"workspaceProjectRepoBranch"` WorkspaceApplicationStartScripts []string `json:"workspaceApplicationStartScripts"` WorkspaceUsername string `json:"workspaceUsername"` WorkspaceEmail string `json:"workspaceEmail"` WorkspacePassword string `json:"workspacePassword"` WorkspaceKeyPair *KeyPair `json:"workspaceKeyPair"` ProjectSetupScript *string `json:"setupScript"` ProjectFolderName string `json:"projectFolderName"` ProjectBrevPath string `json:"brevPath"` ProjectSetupExecPath string `json:"projectSetupExecPath"` UserBrevPath string `json:"userBrevPath"` UserSetupExecPath string `json:"userSetupExecPath"` ReposV0 entity.ReposV0 `json:"repos"` // the new way to handle repos, user and project should be here ExecsV0 entity.ExecsV0 `json:"execs"` // the new way to handle setup scripts ReposV1 entity.ReposV1 `json:"reposV1"` ExecsV1 entity.ExecsV1 `json:"execsV1"` IDEConfigs IDEConfigs `json:"ideConfig"` DisableSetup bool `json:"disableSetup"` }