Documentation
¶
Index ¶
- Constants
- Variables
- func MakeProjectServerCmd(args ProjectServerCmdParams) *exec.Cmd
- func NewShowMessage(typ defines.MessageType, text string) jsonrpc.NotificationMessage
- func StartLSPServer(ctx *core.Context, serverConfig LSPServerConfiguration) (finalErr error)
- type CreateProjectParams
- type DebugConfigurationDoneParams
- type DebugContinueParams
- type DebugDisconnectParams
- type DebugEventCategory
- type DebugInitializeParams
- type DebugLaunchArgs
- type DebugLaunchRequestParams
- type DebugNextParams
- type DebugPauseParams
- type DebugScopesParams
- type DebugSecondaryEvent
- type DebugSession
- type DebugSessions
- type DebugSetBreakpointsParams
- type DebugSetExceptionBreakpointsParams
- type DebugStackTraceParams
- type DebugStepInParams
- type DebugStepOutParams
- type DebugThreadsParams
- type DebugVariablesParams
- type DeleteSecretParams
- type DeployAppParams
- type DeployAppResponse
- type EnableContinuousTestDiscoveryParams
- type Filesystem
- func (fs *Filesystem) Close(ctx *core.Context) error
- func (fs *Filesystem) Events() *memds.TSArrayQueue[fs_ns.Event]
- func (fs *Filesystem) GetWatchers() []*fs_ns.VirtualFilesystemWatcher
- func (fs *Filesystem) OpenFile(filename string, flag int, perm os.FileMode) (billy.File, error)
- func (fs *Filesystem) Watcher(evs *fs_ns.FilesystemEventSource) *fs_ns.VirtualFilesystemWatcher
- type FsCreateDirParams
- type FsDeleteFileParams
- type FsDirEntries
- type FsDirEntry
- type FsFileContentBase64
- type FsFileStat
- type FsFileStatParams
- type FsFileType
- type FsNonCriticalError
- type FsReadFileParams
- type FsReadirParams
- type FsRenameFileParams
- type FsStartUploadParams
- type FsStartUploadResponse
- type FsStructureEvent
- type FsWriteFileParams
- type FsWriteUploadPartParams
- type GetLearnInfoParams
- type GetTutorialSeriesParamss
- type IndividualServerConfig
- type InternalStdio
- type LSPServerConfiguration
- type LearnInfo
- type ListApplicationStatusesParams
- type ListApplicationStatusesResponse
- type ListSecretsParams
- type ListSecretsResponse
- type OpenProjectParams
- type OpenProjectResponse
- type ProjectServerCmdParams
- type RegisterApplicationParams
- type RegisterApplicationResponse
- type RunFinishedParams
- type StopAppParams
- type StopAppResponse
- type StopTestRunParams
- type TestFileParams
- type TestFileResponse
- type TestFilter
- type TestItem
- type TestItemKind
- type TestOutputEvent
- type TestRun
- type TestRunId
- type TestingController
- type TutorialSeriesList
- type UpsertSecretParams
- type WebsocketServerConfiguration
Constants ¶
View Source
const ( INITIALIZE_DEBUG_METHOD = "debug/initialize" DEBUG_CONFIG_DONE_METHOD = "debug/configurationDone" DEBUG_LAUNCH_METHOD = "debug/launch" GET_THREADS_METHOD = "debug/threads" GET_STACK_TRACE_METHOD = "debug/stackTrace" GET_SCOPES_METHOD = "debug/scopes" GET_VARIABLES_METHOD = "debug/variables" SET_BREAKPOINTS_METHOD = "debug/setBreakpoints" SET_EXCEPTION_BREAKPOINTS_METHOD = "debug/setExceptionBreakpoints" DEBUG_PAUSE_METHOD = "debug/pause" DEBUG_CONTINUE_METHOD = "debug/continue" DEBUG_STEP_IN_METHOD = "debug/stepIn" DEBUG_STEP_OUT_METHOD = "debug/stepOut" DEBUG_NEXT_METHOD = "debug/next" DEBUG_DISCONNECT_METHOD = "debug/disconnect" DEFAULT_DEBUG_COMMAND_TIMEOUT = 2 * time.Second EXCEPTION_ERROR_FILTER = "exception" DEFAULT_MAX_SESSION_COUNT = 2 DEFAULT_LOG_LEVEL = zerolog.DebugLevel POST_DONE_DEBUGGED_PROGRAM_DELAY = 100 * time.Millisecond )
View Source
const ( ImportantDebugEvent = "important" StdoutDebugEvent = "stdout" ConsoleDebugEvent = "console" )
View Source
const ( FILE_STAT_METHOD = "fs/fileStat" READ_FILE_METHOD = "fs/readFile" WRITE_FILE_METHOD = "fs/writeFile" START_UPLOAD_METHOD = "fs/startUpload" WRITE_UPLOAD_PART_METHOD = "fs/writeUploadPart" RENAME_FILE_METHOD = "fs/renameFile" DELETE_FILE_METHOD = "fs/deleteFile" CREATE_DIR_METHOD = "fs/createDir" READ_DIR_METHOD = "fs/readDir" FS_STRUCTURE_EVENT_NOTIF_METHOD = "fs/structureEvent" MIN_LAST_CHANGE_AGE_FOR_UNSAVED_DOC_SYNC = time.Second / 2 MIN_LAST_FILE_WRITE_AGE_FOR_UNSAVED_DOC_SYNC_REVERSING = time.Second / 2 FS_EVENT_BATCH_NOTIF_INTERVAL = time.Second )
View Source
const ( UnknownFsFile = 0 FsFile = 1 FsDir = 2 FsSymLink = 64 )
View Source
const ( GET_TUTORIAL_SERIES_METHOD = "learn/getTutorialSeries" GET_LEARN_INFO_METHOD = "learn/getInfo" )
View Source
const ( LSP_LOG_SRC = "lsp" DEFAULT_PROJECT_SERVER_PORT = "8305" )
View Source
const ( CLEAR_UNUSED_CACHE_TIMEOUT = 5 * time.Second REMOVE_UNUSED_CACHE_ENTRY_TIMEOUT = 10 * time.Second )
View Source
const ( VERY_RECENT_ACTIVITY_DELTA = time.Second MAX_PREPARATION_DEPTH = 2 )
View Source
const ( CURRENT_PROJECT_CTX_DATA_PATH = core.Path("/current-project") LSP_FS_CTX_DATA_PATH = core.Path("/current-filesystem") OPEN_PROJECT_METHOD = "project/open" CREATE_PROJECT_METHOD = "project/create" REGISTER_APPLICATION_METHOD = "project/registerApplication" LIST_APPLICATION_STATUSES_METHOD = "project/listApplicationStatuses" )
View Source
const ( LIST_SECRETS_METHOD = "secrets/list" UPSERT_SECRET_METHOD = "secrets/upsert" DELETE_SECRET_METHOD = "secrets/delete" )
View Source
const ( ENABLE_TEST_DISCOVERY_METHOD = "testing/enableContinousDiscovery" TEST_FILE_METHOD = "testing/testFileAsync" STOP_TEST_RUN_METHOD = "testing/stopRun" TEST_OUTPUT_EVENT_METHOD = "testing/outputEvent" TEST_RUN_FINISHED_METHOD = "testing/runFinished" )
View Source
const (
DEFAULT_MAX_IN_MEM_FS_STORAGE_SIZE = 10_000_000
)
View Source
const DEPLOY_PROD_APP_METHOD = "prod/deployApplication"
View Source
const (
INOX_FS_SCHEME = "inox"
)
View Source
const ( //we set the timeout to a small value so that: // - inactive file states are garbage collected quickly // - users do not have too wait long to retry an upload if they encountered an error PROJECT_FILE_STATE_CLEANUP_TIMEOUT = 5 * time.Second )
View Source
const (
SERVER_API_UPDATE_DEBOUNCE_DURATION = time.Second / 2
)
View Source
const STOP_PROD_APP_METHOD = "prod/stopApplication"
Variables ¶
View Source
var ( ErrUnknowSessionId = errors.New("unknown session id") ErrSessionAlreadyExists = errors.New("session already exists") ErrMaxParallelDebugSessionReached = errors.New("the maximum number of parallel debug sessions is already reached") )
View Source
var ( ErrFileBeingCreatedOrModifiedByAnotherSession = errors.New("file is being created or edited by another session") ErrFileBeingCreatedBySameSession = errors.New("file is being created by the same session") )
View Source
var ( ErrFileURIExpected = errors.New("a file: URI was expected") ErrInoxURIExpected = errors.New("a inox: URI was expected") True = true False = false )
View Source
var (
CACHE_CLEARING_INTERVAL = 100 * time.Millisecond
)
View Source
var (
DEFAULT_PROJECT_SERVER_PORT_INT = utils.Must(strconv.Atoi(DEFAULT_PROJECT_SERVER_PORT))
)
View Source
var HOVER_PRETTY_PRINT_CONFIG = &pprint.PrettyPrintConfig{ MaxDepth: 7, Indent: []byte{' ', ' '}, Colorize: false, Compact: false, }
Functions ¶
func MakeProjectServerCmd ¶
func MakeProjectServerCmd(args ProjectServerCmdParams) *exec.Cmd
func NewShowMessage ¶
func NewShowMessage(typ defines.MessageType, text string) jsonrpc.NotificationMessage
func StartLSPServer ¶
func StartLSPServer(ctx *core.Context, serverConfig LSPServerConfiguration) (finalErr error)
Types ¶
type CreateProjectParams ¶
type DebugConfigurationDoneParams ¶
type DebugConfigurationDoneParams struct {
SessionId string `json:"sessionID"`
Request dap.ConfigurationDoneRequest `json:"request"`
}
type DebugContinueParams ¶
type DebugContinueParams struct {
SessionId string `json:"sessionID"`
Request dap.ContinueRequest `json:"request"`
}
type DebugDisconnectParams ¶
type DebugDisconnectParams struct {
SessionId string `json:"sessionID"`
Request dap.DisconnectRequest `json:"request"`
}
type DebugEventCategory ¶
type DebugEventCategory string
type DebugInitializeParams ¶
type DebugInitializeParams struct {
SessionId string `json:"sessionID"`
Request dap.InitializeRequest `json:"request"`
}
type DebugLaunchArgs ¶
type DebugLaunchRequestParams ¶
type DebugLaunchRequestParams struct {
SessionId string `json:"sessionID"`
Request dap.LaunchRequest `json:"request"`
}
type DebugNextParams ¶
type DebugNextParams struct {
SessionId string `json:"sessionID"`
Request dap.ContinueRequest `json:"request"`
}
type DebugPauseParams ¶
type DebugPauseParams struct {
SessionId string `json:"sessionID"`
Request dap.PauseRequest `json:"request"`
}
type DebugScopesParams ¶
type DebugScopesParams struct {
SessionId string `json:"sessionID"`
Request dap.ScopesRequest `json:"request"`
}
type DebugSecondaryEvent ¶
type DebugSession ¶
type DebugSession struct {
// contains filtered or unexported fields
}
func (*DebugSession) NextSeq ¶
func (s *DebugSession) NextSeq() int
type DebugSessions ¶
type DebugSessions struct {
// contains filtered or unexported fields
}
func (*DebugSessions) AddSession ¶
func (sessions *DebugSessions) AddSession(s *DebugSession)
TODO: limit running sessions to 2.
func (*DebugSessions) GetSession ¶
func (sessions *DebugSessions) GetSession(sessionId string) (*DebugSession, bool)
func (*DebugSessions) RemoveSession ¶
func (sessions *DebugSessions) RemoveSession(s *DebugSession)
type DebugSetBreakpointsParams ¶
type DebugSetBreakpointsParams struct {
SessionId string `json:"sessionID"`
Request dap.SetBreakpointsRequest `json:"request"`
}
type DebugSetExceptionBreakpointsParams ¶
type DebugSetExceptionBreakpointsParams struct {
SessionId string `json:"sessionID"`
Request dap.SetExceptionBreakpointsRequest `json:"request"`
}
type DebugStackTraceParams ¶
type DebugStackTraceParams struct {
SessionId string `json:"sessionID"`
Request dap.StackTraceRequest `json:"request"`
}
type DebugStepInParams ¶
type DebugStepInParams struct {
SessionId string `json:"sessionID"`
Request dap.ContinueRequest `json:"request"`
}
type DebugStepOutParams ¶
type DebugStepOutParams struct {
SessionId string `json:"sessionID"`
Request dap.ContinueRequest `json:"request"`
}
type DebugThreadsParams ¶
type DebugThreadsParams struct {
SessionId string `json:"sessionID"`
Request dap.ThreadsRequest `json:"request"`
}
type DebugVariablesParams ¶
type DebugVariablesParams struct {
SessionId string `json:"sessionID"`
Request dap.VariablesRequest `json:"request"`
}
type DeleteSecretParams ¶
type DeleteSecretParams struct {
Name string
}
type DeployAppParams ¶
type DeployAppResponse ¶
type DeployAppResponse struct {
Error string `json:"error,omitempty"`
}
type EnableContinuousTestDiscoveryParams ¶
type EnableContinuousTestDiscoveryParams struct {
}
type Filesystem ¶
type Filesystem struct {
afs.Filesystem
// contains filtered or unexported fields
}
Filesystem is a filesystem that stores the unsaved documents in a separate filesystem.
func NewDefaultFilesystem ¶
func NewDefaultFilesystem() *Filesystem
func NewFilesystem ¶
func NewFilesystem(base afs.Filesystem, unsavedDocumentFs afs.Filesystem) *Filesystem
NewFilesystem creates a new Filesystem with a persistsed filesystem and a filesystem for storing the state of unsave documents. unsavedDocumentFs should be fast.
func (*Filesystem) Events ¶
func (fs *Filesystem) Events() *memds.TSArrayQueue[fs_ns.Event]
func (*Filesystem) GetWatchers ¶
func (fs *Filesystem) GetWatchers() []*fs_ns.VirtualFilesystemWatcher
func (*Filesystem) OpenFile ¶
OpenFile opens the unsaved document if flag is os.O_RDONLY, otherwise the persisted file is open.
func (*Filesystem) Watcher ¶
func (fs *Filesystem) Watcher(evs *fs_ns.FilesystemEventSource) *fs_ns.VirtualFilesystemWatcher
type FsCreateDirParams ¶
type FsDeleteFileParams ¶
type FsDirEntries ¶
type FsDirEntries []FsDirEntry
type FsDirEntry ¶
type FsDirEntry struct {
Name string `json:"name"`
FileType FsFileType `json:"type"`
//The modification timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC.
ModificationTime int64 `json:"mtime"`
}
type FsFileContentBase64 ¶
type FsFileContentBase64 struct {
Content string `json:"content"`
}
type FsFileStat ¶
type FsFileStat struct {
//The creation timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC.
CreationTime int64 `json:"ctime"`
//The modification timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC.
ModificationTime int64 `json:"mtime"`
//The size in bytes.
Size int64 `json:"size"`
FileType FsFileType `json:"type"`
}
type FsFileStatParams ¶
type FsFileType ¶
type FsFileType int
func FileTypeFromInfo ¶
func FileTypeFromInfo(i fs.FileInfo) FsFileType
type FsNonCriticalError ¶
type FsNonCriticalError string
const ( FsFileNotFound FsNonCriticalError = "not-found" FsFileExists FsNonCriticalError = "exists" FsFileIsDir FsNonCriticalError = "is-dir" FsFileIsNotDir FsNonCriticalError = "is-not-dir" FsNoFilesystem FsNonCriticalError = "no-filesystem" )
type FsReadFileParams ¶
type FsReadirParams ¶
type FsRenameFileParams ¶
type FsStartUploadParams ¶
type FsStartUploadResponse ¶
type FsStartUploadResponse struct {
UploadId uploadId `json:"uploadId,omitempty"`
Done bool `json:"done"`
}
type FsStructureEvent ¶
type FsWriteFileParams ¶
type FsWriteUploadPartParams ¶
type GetLearnInfoParams ¶
type GetLearnInfoParams struct {
}
type GetTutorialSeriesParamss ¶
type GetTutorialSeriesParamss struct {
}
type IndividualServerConfig ¶
type IndividualServerConfig struct {
MaxWebSocketPerIp int `json:"maxWebsocketPerIp,omitempty"`
IgnoreInstalledBrowser bool `json:"ignoreInstalledBrowser,omitempty"`
ProjectsDir string `json:"projectsDir,omitempty"` //if not set, defaults to filepath.Join(config.USER_HOME, "inox-projects")
ProdDir string `json:"prodDir,omitempty"` //if not set deployment in production is not allowed
BehindCloudProxy bool `json:"behindCloudProxy,omitempty"`
Port int `json:"port,omitempty"`
BindToAllInterfaces bool `json:"bindToAllInterfaces,omitempty"`
ExposeWebServers bool `json:"exposeWebServers,omitempty"`
AllowBrowserAutomation bool `json:"allowBrowserAutomation,omitempty"`
}
type LSPServerConfiguration ¶
type LSPServerConfiguration struct {
InternalStdio *InternalStdio
Websocket *WebsocketServerConfiguration
MessageReaderWriter jsonrpc.MessageReaderWriter
UseContextLogger bool
ProjectMode bool
ProjectsDir core.Path
ProdDir core.Path //if empty deployment in producation is not allowed
ProjectsDirFilesystem afs.Filesystem
ExposeWebServers bool
OnSession jsonrpc.SessionCreationCallbackFn
}
type ListApplicationStatusesParams ¶
type ListApplicationStatusesParams struct {
}
type ListApplicationStatusesResponse ¶
type ListApplicationStatusesResponse struct {
Statuses map[node.ApplicationName]string `json:"statuses"`
}
type ListSecretsParams ¶
type ListSecretsParams struct {
}
type ListSecretsResponse ¶
type ListSecretsResponse struct {
Secrets []core.ProjectSecretInfo `json:"secrets"`
}
type OpenProjectParams ¶
type OpenProjectParams struct {
ProjectId core.ProjectID `json:"projectId"`
DevSideConfig project.DevSideProjectConfig `json:"config"`
TempTokens *project.TempProjectTokens `json:"tempTokens,omitempty"`
}
type OpenProjectResponse ¶
type OpenProjectResponse struct {
project.TempProjectTokens `json:"tempTokens"`
CanBeDeployedInProd bool `json:"canBeDeployedInProd"`
}
type ProjectServerCmdParams ¶
type RegisterApplicationResponse ¶
type RegisterApplicationResponse struct {
Error string `json:"error,omitempty"`
}
type RunFinishedParams ¶
type RunFinishedParams struct {
}
type StopAppParams ¶
type StopAppParams struct {
AppName string `json:"name"`
}
type StopAppResponse ¶
type StopAppResponse struct {
Error string `json:"error,omitempty"`
}
type StopTestRunParams ¶
type StopTestRunParams struct {
TestRunId TestRunId `json:"testRunId"`
}
type TestFileParams ¶
type TestFileParams struct {
Path string `json:"path"`
PositiveFilters []TestFilter `json:"positiveFilters"`
}
func (TestFileParams) Filters ¶
func (p TestFileParams) Filters() core.TestFilters
type TestFileResponse ¶
type TestFileResponse struct {
TestRunId TestRunId `json:"testRunId"`
}
type TestFilter ¶
type TestFilter struct {
Regex string `json:"regex"`
AbsolutePath string `json:"path,omitempty"`
NodeSpan parse.NodeSpan `json:"span,omitempty"`
}
func (TestFilter) Filter ¶
func (f TestFilter) Filter() core.TestFilter
type TestItemKind ¶
type TestItemKind int8
const ( ModuleTestItem TestItemKind = iota + 1 DirTestItem TestSuite TestCase )
type TestOutputEvent ¶
type TestOutputEvent struct {
DataBase64 string `json:"data"`
}
type TestingController ¶
type TestingController struct {
// contains filtered or unexported fields
}
func (*TestingController) DoContinuousDiscovery ¶
func (c *TestingController) DoContinuousDiscovery()
DoContinuousDiscovery discovers tests continuously by watching the filesystem for changes, DoContinuousDiscovery runs in the caller's goroutine.
type TutorialSeriesList ¶
type TutorialSeriesList struct {
TutorialSeries []learn.TutorialSeries `json:"tutorialSeries"`
}
type UpsertSecretParams ¶
Source Files
¶
- auto_edits.go
- code_action.go
- completions.go
- debug_api.go
- debug_methods.go
- debug_sessions.go
- debugged_program.go
- diagnostics.go
- edition_state.go
- error.go
- exposed_config.go
- filesystem_methods.go
- format.go
- fs.go
- fs_unix.go
- hover.go
- http_api.go
- learning_methods.go
- lsp.go
- messages.go
- preparation_cache.go
- prepare.go
- process.go
- prod_methods.go
- project_methods.go
- secrets_methods.go
- signature_help.go
- standard_lsp_methods.go
- testing.go
- testing_controller.go
- testing_methods.go
- utils.go
Click to show internal directories.
Click to hide internal directories.