Documentation ¶
Index ¶
- Constants
- Variables
- func GetDefaultOrNilOrg(orgs []entity.Organization) *entity.Organization
- func NewRestyClient(brevAPIURL string) *resty.Client
- type Auth
- type AuthHTTPClient
- type AuthHTTPStore
- 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) GetCurrentUser() (*entity.User, error)
- func (s AuthHTTPStore) GetCurrentUserKeys() (*entity.UserKeys, error)
- func (s AuthHTTPStore) GetOrganizations(options *GetOrganizationsOptions) ([]entity.Organization, error)
- func (s AuthHTTPStore) GetWorkspace(workspaceID string) (*entity.Workspace, error)
- func (s AuthHTTPStore) GetWorkspaceMetaData(workspaceID string) (*entity.WorkspaceMetaData, error)
- func (s AuthHTTPStore) GetWorkspaces(organizationID string, options *GetWorkspacesOptions) ([]entity.Workspace, error)
- func (s AuthHTTPStore) NewAuthHTTPStore() *AuthHTTPStore
- 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)
- type BasicStore
- type CreateOrganizationRequest
- type CreateSecretRequest
- type CreateWorkspacesOptions
- type DestConfig
- type DestType
- type FileStore
- func (f FileStore) CreateNewSSHConfigBackup() error
- func (f FileStore) DeleteAuthTokens() error
- func (f FileStore) GetAuthTokens() (*entity.AuthTokens, error)
- func (f FileStore) GetPrivateKeyFilePath() string
- func (f FileStore) GetSSHConfig() (string, error)
- func (f FileStore) SaveAuthTokens(token entity.AuthTokens) error
- func (f *FileStore) WithAuthHTTPClient(c *AuthHTTPClient) *AuthHTTPStore
- func (f *FileStore) WithNoAuthHTTPClient(c *NoAuthHTTPClient) *NoAuthHTTPStore
- func (f FileStore) WritePrivateKey(pem string) error
- func (f FileStore) WriteSSHConfig(config string) error
- type GetOrganizationsOptions
- type GetWorkspacesOptions
- type GithubReleaseMetadata
- type HTTPResponseError
- type HierarchyType
- type NoAuthHTTPClient
- type NoAuthHTTPStore
- func (n NoAuthHTTPStore) CreateUser(identityToken string) (*entity.User, error)
- func (n NoAuthHTTPStore) GetLatestReleaseMetadata() (*GithubReleaseMetadata, error)
- func (n NoAuthHTTPStore) NewNoAuthHTTPStore() *NoAuthHTTPStore
- func (n *NoAuthHTTPStore) WithAuth(auth Auth) *AuthHTTPStore
- func (n *NoAuthHTTPStore) WithAuthHTTPClient(c *AuthHTTPClient) *AuthHTTPStore
- type SecretReqDest
- type SecretReqSrc
- type SrcConfig
- type SrcType
Constants ¶
View Source
const ( DefaultWorkspaceClassID = "2x8" DefaultWorkspaceTemplateID = "4nbb4lg2s" )
Variables ¶
View Source
var ( DefaultApplicationID = "92f59a4yf" DefaultApplication = entity.Application{ ID: DefaultApplicationID, Name: "VSCode", Port: 22778, StartCommand: "", Version: "1.57.1", } )
View Source
var DefaultApplicationList = []entity.Application{DefaultApplication}
Functions ¶
func GetDefaultOrNilOrg ¶
func GetDefaultOrNilOrg(orgs []entity.Organization) *entity.Organization
func NewRestyClient ¶
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 // contains filtered or unexported fields }
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) GetCurrentUser ¶
func (s AuthHTTPStore) GetCurrentUser() (*entity.User, error)
func (AuthHTTPStore) GetCurrentUserKeys ¶
func (s AuthHTTPStore) GetCurrentUserKeys() (*entity.UserKeys, error)
func (AuthHTTPStore) GetOrganizations ¶
func (s AuthHTTPStore) GetOrganizations(options *GetOrganizationsOptions) ([]entity.Organization, error)
func (AuthHTTPStore) GetWorkspace ¶
func (s AuthHTTPStore) GetWorkspace(workspaceID string) (*entity.Workspace, 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) NewAuthHTTPStore ¶
func (s AuthHTTPStore) NewAuthHTTPStore() *AuthHTTPStore
Used if need new instance to customize settings
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)
type BasicStore ¶
type BasicStore struct{}
func NewBasicStore ¶
func NewBasicStore() *BasicStore
func (*BasicStore) WithFileSystem ¶
func (b *BasicStore) WithFileSystem(fs afero.Fs) *FileStore
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"` GitRepo string `json:"gitRepo"` IsStoppable bool `json:"isStoppable"` WorkspaceTemplateID string `json:"workspaceTemplateId"` PrimaryApplicationID string `json:"primaryApplicationId"` Applications []entity.Application `json:"applications"` }
func NewCreateWorkspacesOptions ¶ added in v0.4.0
func NewCreateWorkspacesOptions(clusterID string, name string) *CreateWorkspacesOptions
func (*CreateWorkspacesOptions) WithGitRepo ¶ added in v0.4.0
func (c *CreateWorkspacesOptions) WithGitRepo(gitRepo string) *CreateWorkspacesOptions
type DestConfig ¶
type FileStore ¶
type FileStore struct { BasicStore // contains filtered or unexported fields }
func (FileStore) CreateNewSSHConfigBackup ¶
func (FileStore) DeleteAuthTokens ¶ added in v0.4.0
func (FileStore) GetAuthTokens ¶ added in v0.4.0
func (f FileStore) GetAuthTokens() (*entity.AuthTokens, error)
func (FileStore) GetPrivateKeyFilePath ¶
func (FileStore) GetSSHConfig ¶
!! need something to resolve file path of user ssh
func (FileStore) SaveAuthTokens ¶ added in v0.4.0
func (f FileStore) SaveAuthTokens(token entity.AuthTokens) error
func (*FileStore) WithAuthHTTPClient ¶
func (f *FileStore) WithAuthHTTPClient(c *AuthHTTPClient) *AuthHTTPStore
func (*FileStore) WithNoAuthHTTPClient ¶
func (f *FileStore) WithNoAuthHTTPClient(c *NoAuthHTTPClient) *NoAuthHTTPStore
func (FileStore) WritePrivateKey ¶
func (FileStore) WriteSSHConfig ¶
type GetOrganizationsOptions ¶ added in v0.4.0
type GetOrganizationsOptions struct {
Name string
}
type GetWorkspacesOptions ¶
type GithubReleaseMetadata ¶ added in v0.4.0
type HTTPResponseError ¶
type HTTPResponseError struct {
// contains filtered or unexported fields
}
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 NoAuthHTTPClient ¶
type NoAuthHTTPClient struct {
// contains filtered or unexported fields
}
func NewNoAuthHTTPClient ¶
func NewNoAuthHTTPClient(brevAPIURL string) *NoAuthHTTPClient
type NoAuthHTTPStore ¶
type NoAuthHTTPStore struct { FileStore // contains filtered or unexported fields }
func (NoAuthHTTPStore) CreateUser ¶
func (n NoAuthHTTPStore) CreateUser(identityToken string) (*entity.User, error)
func (NoAuthHTTPStore) GetLatestReleaseMetadata ¶ added in v0.4.0
func (n NoAuthHTTPStore) GetLatestReleaseMetadata() (*GithubReleaseMetadata, error)
func (NoAuthHTTPStore) NewNoAuthHTTPStore ¶
func (n NoAuthHTTPStore) NewNoAuthHTTPStore() *NoAuthHTTPStore
Used if need new instance to customize settings
func (*NoAuthHTTPStore) WithAuth ¶
func (n *NoAuthHTTPStore) WithAuth(auth Auth) *AuthHTTPStore
func (*NoAuthHTTPStore) WithAuthHTTPClient ¶
func (n *NoAuthHTTPStore) WithAuthHTTPClient(c *AuthHTTPClient) *AuthHTTPStore
type SecretReqDest ¶
type SecretReqDest struct { Type DestType `json:"type"` Config DestConfig `json:"config"` }
type SecretReqSrc ¶
Click to show internal directories.
Click to hide internal directories.