Documentation
¶
Index ¶
- func ApiRoutes(router *http.ServeMux)
- func AssetURL(pluginName, rel string) string
- func HandleAuthorization(w http.ResponseWriter, r *http.Request)
- func HandleBackupComplete(w http.ResponseWriter, r *http.Request)
- func HandleBackupContent(w http.ResponseWriter, r *http.Request)
- func HandleBackupKind(w http.ResponseWriter, r *http.Request)
- func HandleCallMethod(w http.ResponseWriter, r *http.Request)
- func HandleCallTool(w http.ResponseWriter, r *http.Request)
- func HandleClearAuthBlocks(w http.ResponseWriter, r *http.Request)
- func HandleClearSpaceRestrictions(w http.ResponseWriter, r *http.Request)
- func HandleCopyFileObject(w http.ResponseWriter, r *http.Request)
- func HandleCreateCommand(w http.ResponseWriter, r *http.Request)
- func HandleCreateEventSink(w http.ResponseWriter, r *http.Request)
- func HandleCreateFileBucket(w http.ResponseWriter, r *http.Request)
- func HandleCreateGroup(w http.ResponseWriter, r *http.Request)
- func HandleCreateMCPServer(w http.ResponseWriter, r *http.Request)
- func HandleCreatePool(w http.ResponseWriter, r *http.Request)
- func HandleCreateRole(w http.ResponseWriter, r *http.Request)
- func HandleCreateScript(w http.ResponseWriter, r *http.Request)
- func HandleCreateSkill(w http.ResponseWriter, r *http.Request)
- func HandleCreateSpace(w http.ResponseWriter, r *http.Request)
- func HandleCreateStackDefinition(w http.ResponseWriter, r *http.Request)
- func HandleCreateTemplate(w http.ResponseWriter, r *http.Request)
- func HandleCreateTemplateVar(w http.ResponseWriter, r *http.Request)
- func HandleCreateToken(w http.ResponseWriter, r *http.Request)
- func HandleCreateUser(w http.ResponseWriter, r *http.Request)
- func HandleCreateVolume(w http.ResponseWriter, r *http.Request)
- func HandleDeleteCommand(w http.ResponseWriter, r *http.Request)
- func HandleDeleteEventSink(w http.ResponseWriter, r *http.Request)
- func HandleDeleteFileBucket(w http.ResponseWriter, r *http.Request)
- func HandleDeleteFileObject(w http.ResponseWriter, r *http.Request)
- func HandleDeleteGroup(w http.ResponseWriter, r *http.Request)
- func HandleDeleteMCPServer(w http.ResponseWriter, r *http.Request)
- func HandleDeletePool(w http.ResponseWriter, r *http.Request)
- func HandleDeleteRole(w http.ResponseWriter, r *http.Request)
- func HandleDeleteScript(w http.ResponseWriter, r *http.Request)
- func HandleDeleteSessions(w http.ResponseWriter, r *http.Request)
- func HandleDeleteSkill(w http.ResponseWriter, r *http.Request)
- func HandleDeleteSpace(w http.ResponseWriter, r *http.Request)
- func HandleDeleteSpaceFile(w http.ResponseWriter, r *http.Request)
- func HandleDeleteStackDefinition(w http.ResponseWriter, r *http.Request)
- func HandleDeleteTemplate(w http.ResponseWriter, r *http.Request)
- func HandleDeleteTemplateVar(w http.ResponseWriter, r *http.Request)
- func HandleDeleteToken(w http.ResponseWriter, r *http.Request)
- func HandleDeleteTunnel(w http.ResponseWriter, r *http.Request)
- func HandleDeleteUser(w http.ResponseWriter, r *http.Request)
- func HandleDeleteVolume(w http.ResponseWriter, r *http.Request)
- func HandleEditFile(w http.ResponseWriter, r *http.Request)
- func HandleEmitEvent(w http.ResponseWriter, r *http.Request)
- func HandleEmitUserEvent(w http.ResponseWriter, r *http.Request)
- func HandleExecuteScript(w http.ResponseWriter, r *http.Request)
- func HandleExecuteScriptStream(w http.ResponseWriter, r *http.Request)
- func HandleExportAuditLogs(w http.ResponseWriter, r *http.Request)
- func HandleExportTemplate(w http.ResponseWriter, r *http.Request)
- func HandleFilesFsck(w http.ResponseWriter, r *http.Request)
- func HandleFind(w http.ResponseWriter, r *http.Request)
- func HandleForwardTargetCheck(w http.ResponseWriter, r *http.Request)
- func HandleGetAuditLogs(w http.ResponseWriter, r *http.Request)
- func HandleGetBackupInfo(w http.ResponseWriter, r *http.Request)
- func HandleGetBaseImages(w http.ResponseWriter, r *http.Request)
- func HandleGetCapabilities(w http.ResponseWriter, r *http.Request)
- func HandleGetClusterInfo(w http.ResponseWriter, r *http.Request)
- func HandleGetClusterNode(w http.ResponseWriter, r *http.Request)
- func HandleGetCommand(w http.ResponseWriter, r *http.Request)
- func HandleGetCommands(w http.ResponseWriter, r *http.Request)
- func HandleGetEventSink(w http.ResponseWriter, r *http.Request)
- func HandleGetEventSinks(w http.ResponseWriter, r *http.Request)
- func HandleGetFileBucket(w http.ResponseWriter, r *http.Request)
- func HandleGetFileBuckets(w http.ResponseWriter, r *http.Request)
- func HandleGetFileObject(w http.ResponseWriter, r *http.Request)
- func HandleGetFileShareTargets(w http.ResponseWriter, r *http.Request)
- func HandleGetFileUsage(w http.ResponseWriter, r *http.Request)
- func HandleGetGlobalScripts(w http.ResponseWriter, r *http.Request)
- func HandleGetGroup(w http.ResponseWriter, r *http.Request)
- func HandleGetGroups(w http.ResponseWriter, r *http.Request)
- func HandleGetIcons(w http.ResponseWriter, r *http.Request)
- func HandleGetMCPServer(w http.ResponseWriter, r *http.Request)
- func HandleGetMCPServerProtocol(w http.ResponseWriter, r *http.Request)
- func HandleGetMCPServers(w http.ResponseWriter, r *http.Request)
- func HandleGetMethods(w http.ResponseWriter, r *http.Request)
- func HandleGetOwnNavPreferences(w http.ResponseWriter, r *http.Request)
- func HandleGetPermissions(w http.ResponseWriter, r *http.Request)
- func HandleGetPluginFieldHandlerOptions(w http.ResponseWriter, r *http.Request)
- func HandleGetPluginFieldHandlers(w http.ResponseWriter, r *http.Request)
- func HandleGetPlugins(w http.ResponseWriter, r *http.Request)
- func HandleGetPool(w http.ResponseWriter, r *http.Request)
- func HandleGetPoolLeases(w http.ResponseWriter, r *http.Request)
- func HandleGetPools(w http.ResponseWriter, r *http.Request)
- func HandleGetRole(w http.ResponseWriter, r *http.Request)
- func HandleGetRoles(w http.ResponseWriter, r *http.Request)
- func HandleGetScript(w http.ResponseWriter, r *http.Request)
- func HandleGetScriptByName(w http.ResponseWriter, r *http.Request)
- func HandleGetScriptDetailsByName(w http.ResponseWriter, r *http.Request)
- func HandleGetScriptLibsZip(w http.ResponseWriter, r *http.Request)
- func HandleGetScripts(w http.ResponseWriter, r *http.Request)
- func HandleGetServerInfo(w http.ResponseWriter, r *http.Request)
- func HandleGetSessions(w http.ResponseWriter, r *http.Request)
- func HandleGetSkill(w http.ResponseWriter, r *http.Request)
- func HandleGetSkills(w http.ResponseWriter, r *http.Request)
- func HandleGetSpace(w http.ResponseWriter, r *http.Request)
- func HandleGetSpaceCustomField(w http.ResponseWriter, r *http.Request)
- func HandleGetSpaceJobs(w http.ResponseWriter, r *http.Request)
- func HandleGetSpaceRestrictions(w http.ResponseWriter, r *http.Request)
- func HandleGetSpaceUsageCurrent(w http.ResponseWriter, r *http.Request)
- func HandleGetSpaceUsageHistory(w http.ResponseWriter, r *http.Request)
- func HandleGetSpaces(w http.ResponseWriter, r *http.Request)
- func HandleGetStackDefinition(w http.ResponseWriter, r *http.Request)
- func HandleGetStackDefinitions(w http.ResponseWriter, r *http.Request)
- func HandleGetTemplate(w http.ResponseWriter, r *http.Request)
- func HandleGetTemplateNodes(w http.ResponseWriter, r *http.Request)
- func HandleGetTemplateVar(w http.ResponseWriter, r *http.Request)
- func HandleGetTemplateVars(w http.ResponseWriter, r *http.Request)
- func HandleGetTemplates(w http.ResponseWriter, r *http.Request)
- func HandleGetTokens(w http.ResponseWriter, r *http.Request)
- func HandleGetTunnelServerInfo(w http.ResponseWriter, r *http.Request)
- func HandleGetTunnels(w http.ResponseWriter, r *http.Request)
- func HandleGetUser(w http.ResponseWriter, r *http.Request)
- func HandleGetUserHasPermission(w http.ResponseWriter, r *http.Request)
- func HandleGetUserPermissions(w http.ResponseWriter, r *http.Request)
- func HandleGetUserQuota(w http.ResponseWriter, r *http.Request)
- func HandleGetUsers(w http.ResponseWriter, r *http.Request)
- func HandleGetVolume(w http.ResponseWriter, r *http.Request)
- func HandleGetVolumeNodes(w http.ResponseWriter, r *http.Request)
- func HandleGetVolumes(w http.ResponseWriter, r *http.Request)
- func HandleGrep(w http.ResponseWriter, r *http.Request)
- func HandleImportTemplate(w http.ResponseWriter, r *http.Request)
- func HandleLinkUser(w http.ResponseWriter, r *http.Request)
- func HandleListFileChanges(w http.ResponseWriter, r *http.Request)
- func HandleListFileObjects(w http.ResponseWriter, r *http.Request)
- func HandleListMCPServerTools(w http.ResponseWriter, r *http.Request)
- func HandleListTools(w http.ResponseWriter, r *http.Request)
- func HandleLogout(w http.ResponseWriter, r *http.Request)
- func HandleMoveFileObjects(w http.ResponseWriter, r *http.Request)
- func HandlePing(w http.ResponseWriter, r *http.Request)
- func HandlePoolAcquire(w http.ResponseWriter, r *http.Request)
- func HandlePoolStart(w http.ResponseWriter, r *http.Request)
- func HandlePoolStop(w http.ResponseWriter, r *http.Request)
- func HandlePutFileObject(w http.ResponseWriter, r *http.Request)
- func HandleReadSpaceFile(w http.ResponseWriter, r *http.Request)
- func HandleRefreshBaseImages(w http.ResponseWriter, r *http.Request)
- func HandleRestoreComplete(w http.ResponseWriter, r *http.Request)
- func HandleRestoreContent(w http.ResponseWriter, r *http.Request)
- func HandleRestoreContentMissing(w http.ResponseWriter, r *http.Request)
- func HandleRestoreKind(w http.ResponseWriter, r *http.Request)
- func HandleRestrictSpace(w http.ResponseWriter, r *http.Request)
- func HandleRunCommand(w http.ResponseWriter, r *http.Request)
- func HandleSSE(w http.ResponseWriter, r *http.Request)
- func HandleSearch(w http.ResponseWriter, r *http.Request)
- func HandleSearchSkills(w http.ResponseWriter, r *http.Request)
- func HandleSed(w http.ResponseWriter, r *http.Request)
- func HandleSetPoolSize(w http.ResponseWriter, r *http.Request)
- func HandleSetSpaceCustomField(w http.ResponseWriter, r *http.Request)
- func HandleShareFileBucket(w http.ResponseWriter, r *http.Request)
- func HandleSpaceAddShare(w http.ResponseWriter, r *http.Request)
- func HandleSpaceLeaseExtend(w http.ResponseWriter, r *http.Request)
- func HandleSpaceLeaseRelease(w http.ResponseWriter, r *http.Request)
- func HandleSpaceRemoveShare(w http.ResponseWriter, r *http.Request)
- func HandleSpaceRestart(w http.ResponseWriter, r *http.Request)
- func HandleSpaceStart(w http.ResponseWriter, r *http.Request)
- func HandleSpaceStop(w http.ResponseWriter, r *http.Request)
- func HandleSpaceStopUsersSpaces(w http.ResponseWriter, r *http.Request)
- func HandleSpaceTransfer(w http.ResponseWriter, r *http.Request)
- func HandleSpecBuild(w http.ResponseWriter, r *http.Request)
- func HandleSpecParse(w http.ResponseWriter, r *http.Request)
- func HandleStackDelete(w http.ResponseWriter, r *http.Request)
- func HandleStackExists(w http.ResponseWriter, r *http.Request)
- func HandleStackRestart(w http.ResponseWriter, r *http.Request)
- func HandleStackStart(w http.ResponseWriter, r *http.Request)
- func HandleStackStop(w http.ResponseWriter, r *http.Request)
- func HandleToggleMCPServerTool(w http.ResponseWriter, r *http.Request)
- func HandleTransferFileBucket(w http.ResponseWriter, r *http.Request)
- func HandleUnlinkUser(w http.ResponseWriter, r *http.Request)
- func HandleUnshareFileBucket(w http.ResponseWriter, r *http.Request)
- func HandleUpdateCommand(w http.ResponseWriter, r *http.Request)
- func HandleUpdateEventSink(w http.ResponseWriter, r *http.Request)
- func HandleUpdateGroup(w http.ResponseWriter, r *http.Request)
- func HandleUpdateMCPServer(w http.ResponseWriter, r *http.Request)
- func HandleUpdateOwnNavPreferences(w http.ResponseWriter, r *http.Request)
- func HandleUpdateOwnSSHPrivateKey(w http.ResponseWriter, r *http.Request)
- func HandleUpdateOwnSSHPublicKey(w http.ResponseWriter, r *http.Request)
- func HandleUpdatePool(w http.ResponseWriter, r *http.Request)
- func HandleUpdateRole(w http.ResponseWriter, r *http.Request)
- func HandleUpdateScript(w http.ResponseWriter, r *http.Request)
- func HandleUpdateSkill(w http.ResponseWriter, r *http.Request)
- func HandleUpdateSpace(w http.ResponseWriter, r *http.Request)
- func HandleUpdateSpaceJobs(w http.ResponseWriter, r *http.Request)
- func HandleUpdateStackDefinition(w http.ResponseWriter, r *http.Request)
- func HandleUpdateTemplate(w http.ResponseWriter, r *http.Request)
- func HandleUpdateTemplateVar(w http.ResponseWriter, r *http.Request)
- func HandleUpdateToken(w http.ResponseWriter, r *http.Request)
- func HandleUpdateUser(w http.ResponseWriter, r *http.Request)
- func HandleUpdateVolume(w http.ResponseWriter, r *http.Request)
- func HandleUsingTotp(w http.ResponseWriter, r *http.Request)
- func HandleValidateStackDefinition(w http.ResponseWriter, r *http.Request)
- func HandleValidateTemplate(w http.ResponseWriter, r *http.Request)
- func HandleValidateVolume(w http.ResponseWriter, r *http.Request)
- func HandleVerifyTOTP(w http.ResponseWriter, r *http.Request)
- func HandleVolumeStart(w http.ResponseWriter, r *http.Request)
- func HandleVolumeStop(w http.ResponseWriter, r *http.Request)
- func HandleWhoAmI(w http.ResponseWriter, r *http.Request)
- func HandleWriteSpaceFile(w http.ResponseWriter, r *http.Request)
- func NotifyFilesChanged(bucketIds []string)
- func RenameUserBuckets(r *http.Request, actor, user *model.User, oldUsername string)
- type AvailableNode
- type ErrorResponse
- type JobsErrorResponse
- type MethodListResponse
- type ReadFileRequest
- type ReadFileResponse
- type RunCommandRequest
- type RunCommandResponse
- type TOTPVerifyRequest
- type TOTPVerifyResponse
- type UnifiedScriptExecuteRequest
- type WriteFileRequest
- type WriteFileResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssetURL ¶ added in v0.34.0
AssetURL returns the served URL for a plugin asset, or "" when the plugin declares none.
func HandleAuthorization ¶
func HandleAuthorization(w http.ResponseWriter, r *http.Request)
func HandleBackupComplete ¶ added in v0.37.0
func HandleBackupComplete(w http.ResponseWriter, r *http.Request)
func HandleBackupContent ¶ added in v0.37.0
func HandleBackupContent(w http.ResponseWriter, r *http.Request)
GET /api/backup/content/{sha}: a file's content by its checksum, fetched from another server if this one does not hold it.
func HandleBackupKind ¶ added in v0.37.0
func HandleBackupKind(w http.ResponseWriter, r *http.Request)
GET /api/backup/{kind}: every record of a kind, one JSON line each. limit_user and limit_template narrow the backup to one user or template.
func HandleCallMethod ¶ added in v0.28.0
func HandleCallMethod(w http.ResponseWriter, r *http.Request)
HandleCallMethod accepts JSON-RPC 2.0 requests in three forms:
- Single request: {"jsonrpc":"2.0","method":"...","params":{},"id":1}
- Batch: [{"jsonrpc":"2.0","method":"...","id":1},{...}]
- Notification: {"jsonrpc":"2.0","method":"...","params":{}} (no id)
Single requests return a single JSON-RPC response object. Batch requests return a JSON array of responses. Notifications produce no response entry. If all items in a batch are notifications the HTTP response is 204.
func HandleCallTool ¶ added in v0.36.0
func HandleCallTool(w http.ResponseWriter, r *http.Request)
HandleCallTool handles POST /api/chat/tools/call — calls a tool directly. The tool_search and execute_tool virtual tools resolve through the same call, exactly as they do for the chat.
func HandleClearAuthBlocks ¶ added in v0.33.0
func HandleClearAuthBlocks(w http.ResponseWriter, r *http.Request)
HandleClearAuthBlocks flushes all auth rate-limit state (failed-login counters and active blocks) so blocked IPs can log in again immediately. Clearing is gossiped so the whole cluster flushes together.
func HandleClearSpaceRestrictions ¶ added in v0.40.0
func HandleClearSpaceRestrictions(w http.ResponseWriter, r *http.Request)
HandleClearSpaceRestrictions lifts a space's restrictions. Only from outside a space: a space can't lift its own, or any other space's.
func HandleCopyFileObject ¶ added in v0.37.0
func HandleCopyFileObject(w http.ResponseWriter, r *http.Request)
HandleCopyFileObject copies a file within or between buckets without moving its content: the caller needs read access to the source and write access to the destination, and the destination bucket's owner is charged for the new file.
func HandleCreateCommand ¶ added in v0.29.0
func HandleCreateCommand(w http.ResponseWriter, r *http.Request)
func HandleCreateEventSink ¶ added in v0.28.0
func HandleCreateEventSink(w http.ResponseWriter, r *http.Request)
func HandleCreateFileBucket ¶ added in v0.37.0
func HandleCreateFileBucket(w http.ResponseWriter, r *http.Request)
func HandleCreateGroup ¶
func HandleCreateGroup(w http.ResponseWriter, r *http.Request)
func HandleCreateMCPServer ¶ added in v0.29.0
func HandleCreateMCPServer(w http.ResponseWriter, r *http.Request)
func HandleCreatePool ¶ added in v0.28.0
func HandleCreatePool(w http.ResponseWriter, r *http.Request)
func HandleCreateRole ¶
func HandleCreateRole(w http.ResponseWriter, r *http.Request)
func HandleCreateScript ¶ added in v0.23.0
func HandleCreateScript(w http.ResponseWriter, r *http.Request)
func HandleCreateSkill ¶ added in v0.23.0
func HandleCreateSkill(w http.ResponseWriter, r *http.Request)
func HandleCreateSpace ¶
func HandleCreateSpace(w http.ResponseWriter, r *http.Request)
func HandleCreateStackDefinition ¶ added in v0.24.0
func HandleCreateStackDefinition(w http.ResponseWriter, r *http.Request)
func HandleCreateTemplate ¶
func HandleCreateTemplate(w http.ResponseWriter, r *http.Request)
func HandleCreateTemplateVar ¶
func HandleCreateTemplateVar(w http.ResponseWriter, r *http.Request)
func HandleCreateToken ¶
func HandleCreateToken(w http.ResponseWriter, r *http.Request)
func HandleCreateUser ¶
func HandleCreateUser(w http.ResponseWriter, r *http.Request)
func HandleCreateVolume ¶
func HandleCreateVolume(w http.ResponseWriter, r *http.Request)
func HandleDeleteCommand ¶ added in v0.29.0
func HandleDeleteCommand(w http.ResponseWriter, r *http.Request)
func HandleDeleteEventSink ¶ added in v0.28.0
func HandleDeleteEventSink(w http.ResponseWriter, r *http.Request)
func HandleDeleteFileBucket ¶ added in v0.37.0
func HandleDeleteFileBucket(w http.ResponseWriter, r *http.Request)
func HandleDeleteFileObject ¶ added in v0.37.0
func HandleDeleteFileObject(w http.ResponseWriter, r *http.Request)
func HandleDeleteGroup ¶
func HandleDeleteGroup(w http.ResponseWriter, r *http.Request)
func HandleDeleteMCPServer ¶ added in v0.29.0
func HandleDeleteMCPServer(w http.ResponseWriter, r *http.Request)
func HandleDeletePool ¶ added in v0.28.0
func HandleDeletePool(w http.ResponseWriter, r *http.Request)
func HandleDeleteRole ¶
func HandleDeleteRole(w http.ResponseWriter, r *http.Request)
func HandleDeleteScript ¶ added in v0.23.0
func HandleDeleteScript(w http.ResponseWriter, r *http.Request)
func HandleDeleteSessions ¶
func HandleDeleteSessions(w http.ResponseWriter, r *http.Request)
func HandleDeleteSkill ¶ added in v0.23.0
func HandleDeleteSkill(w http.ResponseWriter, r *http.Request)
func HandleDeleteSpace ¶
func HandleDeleteSpace(w http.ResponseWriter, r *http.Request)
func HandleDeleteSpaceFile ¶ added in v0.31.0
func HandleDeleteSpaceFile(w http.ResponseWriter, r *http.Request)
HandleDeleteSpaceFile removes a file or directory from a space. A recursive delete uses os.RemoveAll semantics; a non-recursive delete on a non-empty directory fails. Missing paths are treated as success so the call is idempotent — important for sync tools whose "delete list" was computed against a slightly stale remote snapshot.
func HandleDeleteStackDefinition ¶ added in v0.24.0
func HandleDeleteStackDefinition(w http.ResponseWriter, r *http.Request)
func HandleDeleteTemplate ¶
func HandleDeleteTemplate(w http.ResponseWriter, r *http.Request)
func HandleDeleteTemplateVar ¶
func HandleDeleteTemplateVar(w http.ResponseWriter, r *http.Request)
func HandleDeleteToken ¶
func HandleDeleteToken(w http.ResponseWriter, r *http.Request)
func HandleDeleteTunnel ¶
func HandleDeleteTunnel(w http.ResponseWriter, r *http.Request)
func HandleDeleteUser ¶
func HandleDeleteUser(w http.ResponseWriter, r *http.Request)
func HandleDeleteVolume ¶
func HandleDeleteVolume(w http.ResponseWriter, r *http.Request)
func HandleEditFile ¶ added in v0.30.0
func HandleEditFile(w http.ResponseWriter, r *http.Request)
HandleEditFile performs a targeted search-and-replace edit in a space.
func HandleEmitEvent ¶ added in v0.28.0
func HandleEmitEvent(w http.ResponseWriter, r *http.Request)
HandleEmitEvent raises a custom event from within a space. It is used by the space-side scriptling knot.event.emit() via the apiclient MuxClient.
func HandleEmitUserEvent ¶ added in v0.28.1
func HandleEmitUserEvent(w http.ResponseWriter, r *http.Request)
HandleEmitUserEvent raises a user-scoped custom event from a server-side script context (e.g. MCP tool execution) where there is no associated space. It is the target of the loopback knot.event.emit() library registered in the MCP scriptling environment.
func HandleExecuteScript ¶ added in v0.23.0
func HandleExecuteScript(w http.ResponseWriter, r *http.Request)
func HandleExecuteScriptStream ¶ added in v0.23.0
func HandleExecuteScriptStream(w http.ResponseWriter, r *http.Request)
func HandleExportAuditLogs ¶ added in v0.24.0
func HandleExportAuditLogs(w http.ResponseWriter, r *http.Request)
func HandleExportTemplate ¶ added in v0.32.0
func HandleExportTemplate(w http.ResponseWriter, r *http.Request)
HandleExportTemplate returns a portable YAML representation of a template suitable for version control and cross-instance import. The route requires PermissionManageTemplates: the export is a full read of the template (job, volumes — including any registry auth in the job), so it stays restricted to template managers.
func HandleFilesFsck ¶ added in v0.37.0
func HandleFilesFsck(w http.ResponseWriter, r *http.Request)
HandleFilesFsck checks file storage, and with repair set fixes what it can. Only file storage administrators may run it.
func HandleFind ¶ added in v0.30.0
func HandleFind(w http.ResponseWriter, r *http.Request)
HandleFind finds files/directories in a space.
func HandleForwardTargetCheck ¶ added in v0.36.0
func HandleForwardTargetCheck(w http.ResponseWriter, r *http.Request)
HandleForwardTargetCheck reports whether the requesting user may forward to a target reference and port right now. Agents call it before creating a port forward requested from inside a space (the agentlink path), where the agent cannot judge cross-user targets itself: bare names it can check against the owner's space list, but user--space, pools and UUIDs need the server's resolution. The proxy's per-connection check remains the authority regardless.
func HandleGetAuditLogs ¶
func HandleGetAuditLogs(w http.ResponseWriter, r *http.Request)
func HandleGetBackupInfo ¶ added in v0.37.0
func HandleGetBackupInfo(w http.ResponseWriter, r *http.Request)
func HandleGetBaseImages ¶ added in v0.32.0
func HandleGetBaseImages(w http.ResponseWriter, r *http.Request)
HandleGetBaseImages returns the active base image manifest (embedded or external per server config). The Image field's ${{ .server.base_image_registry }} is left as-is; resolution happens at deploy time in the spec itself.
func HandleGetCapabilities ¶ added in v0.32.0
func HandleGetCapabilities(w http.ResponseWriter, r *http.Request)
HandleGetCapabilities returns the Linux capability catalog the wizard's capability picker renders (name + description, searchable client-side). The list is a static common subset; unknown-but-well-formed CAP_* names already present in a spec still round-trip through the wizard.
func HandleGetClusterInfo ¶
func HandleGetClusterInfo(w http.ResponseWriter, r *http.Request)
func HandleGetClusterNode ¶ added in v0.22.0
func HandleGetClusterNode(w http.ResponseWriter, r *http.Request)
func HandleGetCommand ¶ added in v0.29.0
func HandleGetCommand(w http.ResponseWriter, r *http.Request)
func HandleGetCommands ¶ added in v0.29.0
func HandleGetCommands(w http.ResponseWriter, r *http.Request)
func HandleGetEventSink ¶ added in v0.28.0
func HandleGetEventSink(w http.ResponseWriter, r *http.Request)
func HandleGetEventSinks ¶ added in v0.28.0
func HandleGetEventSinks(w http.ResponseWriter, r *http.Request)
func HandleGetFileBucket ¶ added in v0.37.0
func HandleGetFileBucket(w http.ResponseWriter, r *http.Request)
func HandleGetFileBuckets ¶ added in v0.37.0
func HandleGetFileBuckets(w http.ResponseWriter, r *http.Request)
func HandleGetFileObject ¶ added in v0.37.0
func HandleGetFileObject(w http.ResponseWriter, r *http.Request)
func HandleGetFileShareTargets ¶ added in v0.37.0
func HandleGetFileShareTargets(w http.ResponseWriter, r *http.Request)
HandleGetFileShareTargets lists the users and groups a bucket can be shared with or transferred to — the share and transfer dialogs' choices, without the user management permission /api/users needs. The caller is included, marked, so an administrator can transfer a bucket to themselves.
func HandleGetFileUsage ¶ added in v0.37.0
func HandleGetFileUsage(w http.ResponseWriter, r *http.Request)
func HandleGetGlobalScripts ¶ added in v0.23.0
func HandleGetGlobalScripts(w http.ResponseWriter, r *http.Request)
HandleGetGlobalScripts returns global scripts for template editing. Users with PermissionManageTemplates can see global scripts even without PermissionManageScripts.
func HandleGetGroup ¶
func HandleGetGroup(w http.ResponseWriter, r *http.Request)
func HandleGetGroups ¶
func HandleGetGroups(w http.ResponseWriter, r *http.Request)
func HandleGetIcons ¶ added in v0.23.0
func HandleGetIcons(w http.ResponseWriter, r *http.Request)
func HandleGetMCPServer ¶ added in v0.29.0
func HandleGetMCPServer(w http.ResponseWriter, r *http.Request)
func HandleGetMCPServerProtocol ¶ added in v0.36.0
func HandleGetMCPServerProtocol(w http.ResponseWriter, r *http.Request)
HandleGetMCPServerProtocol returns the MCP protocol version actually negotiated with a remote server (e.g. "2025-06-18" for a Legacy server, or the Modern era's fixed revision). This isn't known until a client connects, so it's fetched on demand rather than eagerly for every server in the list — a connection failure here returns an empty version, not an error, so the UI can treat it as "unavailable" instead of a hard failure.
func HandleGetMCPServers ¶ added in v0.29.0
func HandleGetMCPServers(w http.ResponseWriter, r *http.Request)
func HandleGetMethods ¶ added in v0.28.0
func HandleGetMethods(w http.ResponseWriter, r *http.Request)
func HandleGetOwnNavPreferences ¶ added in v0.32.0
func HandleGetOwnNavPreferences(w http.ResponseWriter, r *http.Request)
HandleGetOwnNavPreferences returns the current user's pinned (starred) sidebar URLs in their stored display order.
func HandleGetPermissions ¶
func HandleGetPermissions(w http.ResponseWriter, r *http.Request)
func HandleGetPluginFieldHandlerOptions ¶ added in v0.34.0
func HandleGetPluginFieldHandlerOptions(w http.ResponseWriter, r *http.Request)
HandleGetPluginFieldHandlerOptions calls a plugin's declared field handler as the requesting user and returns whatever it produced — conventionally {"options": [...]} for the bound custom field.
func HandleGetPluginFieldHandlers ¶ added in v0.34.0
func HandleGetPluginFieldHandlers(w http.ResponseWriter, r *http.Request)
HandleGetPluginFieldHandlers lists every declared field handler, for the template form's custom field binding popup.
func HandleGetPlugins ¶ added in v0.34.0
func HandleGetPlugins(w http.ResponseWriter, r *http.Request)
HandleGetPlugins returns the plugin inventory: loaded plugins with everything they declare — permissions, menus, pages, MCP tools, handlers, field handlers, peers (Go and scriptling) — plus failed plugins and load warnings. This is the admin plugins page's data source and feeds the role editor's plugin-permissions section.
func HandleGetPool ¶ added in v0.28.0
func HandleGetPool(w http.ResponseWriter, r *http.Request)
func HandleGetPoolLeases ¶ added in v0.36.0
func HandleGetPoolLeases(w http.ResponseWriter, r *http.Request)
func HandleGetPools ¶ added in v0.28.0
func HandleGetPools(w http.ResponseWriter, r *http.Request)
func HandleGetRole ¶
func HandleGetRole(w http.ResponseWriter, r *http.Request)
func HandleGetRoles ¶
func HandleGetRoles(w http.ResponseWriter, r *http.Request)
func HandleGetScript ¶ added in v0.23.0
func HandleGetScript(w http.ResponseWriter, r *http.Request)
func HandleGetScriptByName ¶ added in v0.23.0
func HandleGetScriptByName(w http.ResponseWriter, r *http.Request)
func HandleGetScriptDetailsByName ¶ added in v0.23.0
func HandleGetScriptDetailsByName(w http.ResponseWriter, r *http.Request)
func HandleGetScriptLibsZip ¶ added in v0.33.0
func HandleGetScriptLibsZip(w http.ResponseWriter, r *http.Request)
HandleGetScriptLibsZip serves the requesting user's `lib` scripts (their own plus global libraries, user overriding global on name collisions) packaged as a scriptling library zip: manifest.toml + lib/<name>.py. Agents fetch and cache this and re-serve it to in-space scriptling as /packages/libs.zip.
func HandleGetScripts ¶ added in v0.23.0
func HandleGetScripts(w http.ResponseWriter, r *http.Request)
func HandleGetServerInfo ¶ added in v0.26.0
func HandleGetServerInfo(w http.ResponseWriter, r *http.Request)
HandleGetServerInfo returns server-wide configuration that clients need but that is not user-specific (e.g. the wildcard domain used to build space web-port URLs).
func HandleGetSessions ¶
func HandleGetSessions(w http.ResponseWriter, r *http.Request)
func HandleGetSkill ¶ added in v0.23.0
func HandleGetSkill(w http.ResponseWriter, r *http.Request)
func HandleGetSkills ¶ added in v0.23.0
func HandleGetSkills(w http.ResponseWriter, r *http.Request)
func HandleGetSpace ¶
func HandleGetSpace(w http.ResponseWriter, r *http.Request)
func HandleGetSpaceCustomField ¶ added in v0.21.5
func HandleGetSpaceCustomField(w http.ResponseWriter, r *http.Request)
func HandleGetSpaceJobs ¶ added in v0.33.0
func HandleGetSpaceJobs(w http.ResponseWriter, r *http.Request)
HandleGetSpaceJobs returns the space's persisted job definitions and runner state. Works for stopped spaces too — the space record is the source of truth, only live run status needs the agent.
func HandleGetSpaceRestrictions ¶ added in v0.40.0
func HandleGetSpaceRestrictions(w http.ResponseWriter, r *http.Request)
HandleGetSpaceRestrictions reports a space's restrictions.
func HandleGetSpaceUsageCurrent ¶ added in v0.24.0
func HandleGetSpaceUsageCurrent(w http.ResponseWriter, r *http.Request)
func HandleGetSpaceUsageHistory ¶ added in v0.24.0
func HandleGetSpaceUsageHistory(w http.ResponseWriter, r *http.Request)
func HandleGetSpaces ¶
func HandleGetSpaces(w http.ResponseWriter, r *http.Request)
func HandleGetStackDefinition ¶ added in v0.24.0
func HandleGetStackDefinition(w http.ResponseWriter, r *http.Request)
func HandleGetStackDefinitions ¶ added in v0.24.0
func HandleGetStackDefinitions(w http.ResponseWriter, r *http.Request)
func HandleGetTemplate ¶
func HandleGetTemplate(w http.ResponseWriter, r *http.Request)
func HandleGetTemplateNodes ¶ added in v0.22.0
func HandleGetTemplateNodes(w http.ResponseWriter, r *http.Request)
func HandleGetTemplateVar ¶
func HandleGetTemplateVar(w http.ResponseWriter, r *http.Request)
func HandleGetTemplateVars ¶
func HandleGetTemplateVars(w http.ResponseWriter, r *http.Request)
func HandleGetTemplates ¶
func HandleGetTemplates(w http.ResponseWriter, r *http.Request)
func HandleGetTokens ¶
func HandleGetTokens(w http.ResponseWriter, r *http.Request)
func HandleGetTunnelServerInfo ¶
func HandleGetTunnelServerInfo(w http.ResponseWriter, r *http.Request)
func HandleGetTunnels ¶
func HandleGetTunnels(w http.ResponseWriter, r *http.Request)
func HandleGetUser ¶
func HandleGetUser(w http.ResponseWriter, r *http.Request)
func HandleGetUserHasPermission ¶ added in v0.23.0
func HandleGetUserHasPermission(w http.ResponseWriter, r *http.Request)
func HandleGetUserPermissions ¶ added in v0.23.0
func HandleGetUserPermissions(w http.ResponseWriter, r *http.Request)
func HandleGetUserQuota ¶
func HandleGetUserQuota(w http.ResponseWriter, r *http.Request)
func HandleGetUsers ¶
func HandleGetUsers(w http.ResponseWriter, r *http.Request)
func HandleGetVolume ¶
func HandleGetVolume(w http.ResponseWriter, r *http.Request)
func HandleGetVolumeNodes ¶ added in v0.23.6
func HandleGetVolumeNodes(w http.ResponseWriter, r *http.Request)
func HandleGetVolumes ¶
func HandleGetVolumes(w http.ResponseWriter, r *http.Request)
func HandleGrep ¶ added in v0.30.0
func HandleGrep(w http.ResponseWriter, r *http.Request)
HandleGrep searches file contents in a space.
func HandleImportTemplate ¶ added in v0.32.0
func HandleImportTemplate(w http.ResponseWriter, r *http.Request)
HandleImportTemplate accepts a portable YAML template export, resolves script names to IDs, and creates the template via the existing create path.
func HandleLinkUser ¶ added in v0.34.0
func HandleLinkUser(w http.ResponseWriter, r *http.Request)
HandleLinkUser grants one user the ability to become another: the linked user joins target's become-list, so target's profile menu offers it. The grant is one way — the linked user cannot become target.
func HandleListFileChanges ¶ added in v0.37.0
func HandleListFileChanges(w http.ResponseWriter, r *http.Request)
HandleListFileChanges returns what changed in a bucket since a cursor.
func HandleListFileObjects ¶ added in v0.37.0
func HandleListFileObjects(w http.ResponseWriter, r *http.Request)
func HandleListMCPServerTools ¶ added in v0.29.0
func HandleListMCPServerTools(w http.ResponseWriter, r *http.Request)
func HandleListTools ¶ added in v0.36.0
func HandleListTools(w http.ResponseWriter, r *http.Request)
HandleListTools handles GET /api/chat/tools — lists available tools.
func HandleLogout ¶
func HandleLogout(w http.ResponseWriter, r *http.Request)
func HandleMoveFileObjects ¶ added in v0.37.0
func HandleMoveFileObjects(w http.ResponseWriter, r *http.Request)
POST /api/files/move: rename a file, or a folder and its contents, within a bucket, on the server.
func HandlePing ¶
func HandlePing(w http.ResponseWriter, r *http.Request)
func HandlePoolAcquire ¶ added in v0.36.0
func HandlePoolAcquire(w http.ResponseWriter, r *http.Request)
func HandlePoolStart ¶ added in v0.28.0
func HandlePoolStart(w http.ResponseWriter, r *http.Request)
func HandlePoolStop ¶ added in v0.28.0
func HandlePoolStop(w http.ResponseWriter, r *http.Request)
func HandlePutFileObject ¶ added in v0.37.0
func HandlePutFileObject(w http.ResponseWriter, r *http.Request)
func HandleReadSpaceFile ¶ added in v0.23.0
func HandleReadSpaceFile(w http.ResponseWriter, r *http.Request)
func HandleRefreshBaseImages ¶ added in v0.32.0
func HandleRefreshBaseImages(w http.ResponseWriter, r *http.Request)
HandleRefreshBaseImages forces an immediate fetch of the base image manifest. It uses the same FetchDecision as the startup path: it fetches iff both --base-images-update-enabled and --base-images-update-url are set (there is no default URL). With a manifest file configured, the file is the baseline and the fetched copy overlays it only when its manifest_version is newer. Exposed via the `knot admin refresh-base-images` CLI command.
func HandleRestoreComplete ¶ added in v0.37.0
func HandleRestoreComplete(w http.ResponseWriter, r *http.Request)
func HandleRestoreContent ¶ added in v0.37.0
func HandleRestoreContent(w http.ResponseWriter, r *http.Request)
PUT /api/restore/content/{sha}: store a file's content, checked against its checksum. Content no file refers to is not kept.
func HandleRestoreContentMissing ¶ added in v0.37.0
func HandleRestoreContentMissing(w http.ResponseWriter, r *http.Request)
POST /api/restore/content/missing: which of some checksums this server holds no content for, so a restore sends only what is needed.
func HandleRestoreKind ¶ added in v0.37.0
func HandleRestoreKind(w http.ResponseWriter, r *http.Request)
POST /api/restore/{kind}: save the records of a kind, sent as JSON lines.
func HandleRestrictSpace ¶ added in v0.40.0
func HandleRestrictSpace(w http.ResponseWriter, r *http.Request)
HandleRestrictSpace adds restrictions to a space. They only ever tighten what the space may do, so a space may restrict itself, and are cleared when the space next starts.
func HandleRunCommand ¶ added in v0.23.0
func HandleRunCommand(w http.ResponseWriter, r *http.Request)
func HandleSSE ¶ added in v0.21.8
func HandleSSE(w http.ResponseWriter, r *http.Request)
HandleSSE handles Server-Sent Events connections for real-time updates
func HandleSearch ¶ added in v0.32.0
func HandleSearch(w http.ResponseWriter, r *http.Request)
HandleSearch performs a permission-, ownership- and zone-scoped keyword search across the entity types the current user may see. Matching is a case-insensitive substring match on each entity's primary name. Each result group is capped at searchLimitPerType entries; empty groups are omitted.
Scoping mirrors the sidebar visibility gates:
- spaces are the current user's own plus any shared with them;
- admin entities (templates, variables, volumes, users, groups, roles, stacks, event sinks) appear only when the user holds the manage permission for that type;
- personal entities (scripts, skills, slash commands, MCP servers, tokens) are scoped to the user's own (plus global ones where the list endpoint exposes them);
- leaf nodes get the same reduced set as the sidebar (no users/groups/roles).
func HandleSearchSkills ¶ added in v0.23.0
func HandleSearchSkills(w http.ResponseWriter, r *http.Request)
func HandleSed ¶ added in v0.30.0
func HandleSed(w http.ResponseWriter, r *http.Request)
HandleSed performs in-place edits or capture extraction in a space.
func HandleSetPoolSize ¶ added in v0.28.0
func HandleSetPoolSize(w http.ResponseWriter, r *http.Request)
func HandleSetSpaceCustomField ¶ added in v0.21.5
func HandleSetSpaceCustomField(w http.ResponseWriter, r *http.Request)
func HandleShareFileBucket ¶ added in v0.37.0
func HandleShareFileBucket(w http.ResponseWriter, r *http.Request)
func HandleSpaceAddShare ¶
func HandleSpaceAddShare(w http.ResponseWriter, r *http.Request)
func HandleSpaceLeaseExtend ¶ added in v0.36.0
func HandleSpaceLeaseExtend(w http.ResponseWriter, r *http.Request)
func HandleSpaceLeaseRelease ¶ added in v0.36.0
func HandleSpaceLeaseRelease(w http.ResponseWriter, r *http.Request)
func HandleSpaceRemoveShare ¶
func HandleSpaceRemoveShare(w http.ResponseWriter, r *http.Request)
func HandleSpaceRestart ¶
func HandleSpaceRestart(w http.ResponseWriter, r *http.Request)
func HandleSpaceStart ¶
func HandleSpaceStart(w http.ResponseWriter, r *http.Request)
func HandleSpaceStop ¶
func HandleSpaceStop(w http.ResponseWriter, r *http.Request)
func HandleSpaceStopUsersSpaces ¶
func HandleSpaceStopUsersSpaces(w http.ResponseWriter, r *http.Request)
func HandleSpaceTransfer ¶
func HandleSpaceTransfer(w http.ResponseWriter, r *http.Request)
func HandleSpecBuild ¶ added in v0.32.0
func HandleSpecBuild(w http.ResponseWriter, r *http.Request)
HandleSpecBuild converts a unified spec back into native text. On the Nomad side this patches the wizard's fields into the original HCL; on the container side it regenerates from the spec. See BuildNomadHCL / BuildContainerYAML for the per-platform behaviour.
func HandleSpecParse ¶ added in v0.32.0
func HandleSpecParse(w http.ResponseWriter, r *http.Request)
HandleSpecParse converts a native template spec into the unified JSON the wizard edits. Returns wizardable=false if the spec is too complex for the wizard (multi-task Nomad job, unparseable HCL, unsupported driver, etc.); the UI uses that flag to disable the wizard button.
func HandleStackDelete ¶ added in v0.26.2
func HandleStackDelete(w http.ResponseWriter, r *http.Request)
func HandleStackExists ¶ added in v0.30.1
func HandleStackExists(w http.ResponseWriter, r *http.Request)
HandleStackExists reports whether a stack name is already in use for the requesting user (i.e. there is at least one non-deleted space with that Stack). Used by the create-stack flows to refuse reusing an existing stack name, which would otherwise mix spaces from different stack instances.
func HandleStackRestart ¶ added in v0.24.0
func HandleStackRestart(w http.ResponseWriter, r *http.Request)
func HandleStackStart ¶ added in v0.24.0
func HandleStackStart(w http.ResponseWriter, r *http.Request)
func HandleStackStop ¶ added in v0.24.0
func HandleStackStop(w http.ResponseWriter, r *http.Request)
func HandleToggleMCPServerTool ¶ added in v0.29.0
func HandleToggleMCPServerTool(w http.ResponseWriter, r *http.Request)
func HandleTransferFileBucket ¶ added in v0.37.0
func HandleTransferFileBucket(w http.ResponseWriter, r *http.Request)
func HandleUnlinkUser ¶ added in v0.34.0
func HandleUnlinkUser(w http.ResponseWriter, r *http.Request)
HandleUnlinkUser removes one user from another's become-list. The unlinked user's own list is untouched — links were only ever one way.
func HandleUnshareFileBucket ¶ added in v0.37.0
func HandleUnshareFileBucket(w http.ResponseWriter, r *http.Request)
func HandleUpdateCommand ¶ added in v0.29.0
func HandleUpdateCommand(w http.ResponseWriter, r *http.Request)
func HandleUpdateEventSink ¶ added in v0.28.0
func HandleUpdateEventSink(w http.ResponseWriter, r *http.Request)
func HandleUpdateGroup ¶
func HandleUpdateGroup(w http.ResponseWriter, r *http.Request)
func HandleUpdateMCPServer ¶ added in v0.29.0
func HandleUpdateMCPServer(w http.ResponseWriter, r *http.Request)
func HandleUpdateOwnNavPreferences ¶ added in v0.32.0
func HandleUpdateOwnNavPreferences(w http.ResponseWriter, r *http.Request)
HandleUpdateOwnNavPreferences replaces the current user's pinned sidebar ordering. Core URLs are validated against apiclient.ValidNavURLs; plugin menu URLs against the plugin menus this user can currently see (the same gate the sidebar renders by), so an item is pinnable exactly when it is visible and arbitrary strings still can't enter the preferences blob. Entries are de-duplicated preserving order; an empty slice clears the preference, returning the sidebar to its default layout.
func HandleUpdateOwnSSHPrivateKey ¶ added in v0.25.0
func HandleUpdateOwnSSHPrivateKey(w http.ResponseWriter, r *http.Request)
func HandleUpdateOwnSSHPublicKey ¶ added in v0.25.0
func HandleUpdateOwnSSHPublicKey(w http.ResponseWriter, r *http.Request)
func HandleUpdatePool ¶ added in v0.28.0
func HandleUpdatePool(w http.ResponseWriter, r *http.Request)
func HandleUpdateRole ¶
func HandleUpdateRole(w http.ResponseWriter, r *http.Request)
func HandleUpdateScript ¶ added in v0.23.0
func HandleUpdateScript(w http.ResponseWriter, r *http.Request)
func HandleUpdateSkill ¶ added in v0.23.0
func HandleUpdateSkill(w http.ResponseWriter, r *http.Request)
func HandleUpdateSpace ¶
func HandleUpdateSpace(w http.ResponseWriter, r *http.Request)
func HandleUpdateSpaceJobs ¶ added in v0.33.0
func HandleUpdateSpaceJobs(w http.ResponseWriter, r *http.Request)
HandleUpdateSpaceJobs replaces the space's job definitions and runner state, then pushes the change to the agent when the space is running.
func HandleUpdateStackDefinition ¶ added in v0.24.0
func HandleUpdateStackDefinition(w http.ResponseWriter, r *http.Request)
func HandleUpdateTemplate ¶
func HandleUpdateTemplate(w http.ResponseWriter, r *http.Request)
func HandleUpdateTemplateVar ¶
func HandleUpdateTemplateVar(w http.ResponseWriter, r *http.Request)
func HandleUpdateToken ¶ added in v0.28.0
func HandleUpdateToken(w http.ResponseWriter, r *http.Request)
HandleUpdateToken allows changing a token's name and/or scopes without recreating it (the token ID stays the same, so callers don't need to re-credential).
func HandleUpdateUser ¶
func HandleUpdateUser(w http.ResponseWriter, r *http.Request)
func HandleUpdateVolume ¶
func HandleUpdateVolume(w http.ResponseWriter, r *http.Request)
func HandleUsingTotp ¶
func HandleUsingTotp(w http.ResponseWriter, r *http.Request)
Returns if the server is using TOTP or not, the CLI client uses this to work out the authentication flow it should use.
func HandleValidateStackDefinition ¶ added in v0.24.0
func HandleValidateStackDefinition(w http.ResponseWriter, r *http.Request)
func HandleValidateTemplate ¶ added in v0.24.0
func HandleValidateTemplate(w http.ResponseWriter, r *http.Request)
func HandleValidateVolume ¶ added in v0.24.0
func HandleValidateVolume(w http.ResponseWriter, r *http.Request)
func HandleVerifyTOTP ¶ added in v0.37.0
func HandleVerifyTOTP(w http.ResponseWriter, r *http.Request)
HandleVerifyTOTP checks a code against the signed-in user's stored TOTP secret. The web login uses it after showing a newly generated secret, so the user proves their authenticator app works before carrying on. It changes nothing; wrong codes count towards the same rate limiter as failed logins and are audit-logged.
func HandleVolumeStart ¶
func HandleVolumeStart(w http.ResponseWriter, r *http.Request)
func HandleVolumeStop ¶
func HandleVolumeStop(w http.ResponseWriter, r *http.Request)
func HandleWhoAmI ¶
func HandleWhoAmI(w http.ResponseWriter, r *http.Request)
func HandleWriteSpaceFile ¶ added in v0.23.0
func HandleWriteSpaceFile(w http.ResponseWriter, r *http.Request)
func NotifyFilesChanged ¶ added in v0.37.0
func NotifyFilesChanged(bucketIds []string)
NotifyFilesChanged tells each connected user which of the buckets that changed they can see, or could until the change: a user hears nothing of buckets that aren't theirs or shared with them. An empty list, when too many buckets changed to name, goes to every user able to use file storage.
Types ¶
type AvailableNode ¶ added in v0.22.0
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error" msgpack:"error"`
}
type JobsErrorResponse ¶ added in v0.33.0
type JobsErrorResponse struct {
Error string `json:"error"`
JobErrors map[string]string `json:"job_errors,omitempty"`
}
JobsErrorResponse is the 400 body from the jobs update endpoint: JobErrors maps each invalid job name to its validation error.
type MethodListResponse ¶ added in v0.28.0
type MethodListResponse struct {
Count int `json:"count" msgpack:"count"`
Methods []methods.MethodInfo `json:"methods" msgpack:"methods"`
}
type ReadFileRequest ¶ added in v0.23.0
type ReadFileRequest struct {
Path string `json:"path" msgpack:"path"`
Offset int `json:"offset,omitempty" msgpack:"offset,omitempty"` // 1-based line number to start at (0/absent = from beginning)
Limit int `json:"limit,omitempty" msgpack:"limit,omitempty"` // max lines to return (0/absent = no limit)
}
type ReadFileResponse ¶ added in v0.23.0
type ReadFileResponse struct {
Success bool `json:"success" msgpack:"success"`
Content string `json:"content,omitempty" msgpack:"content,omitempty"`
Size int `json:"size,omitempty" msgpack:"size,omitempty"`
TotalLines int `json:"total_lines,omitempty" msgpack:"total_lines,omitempty"` // total lines in the file (only when offset/limit used)
Offset int `json:"offset,omitempty" msgpack:"offset,omitempty"` // applied offset (1-based, only when offset/limit used)
Limit int `json:"limit,omitempty" msgpack:"limit,omitempty"` // applied limit (only when offset/limit used)
Error string `json:"error,omitempty" msgpack:"error,omitempty"`
}
type RunCommandRequest ¶ added in v0.23.0
type RunCommandResponse ¶ added in v0.23.0
type TOTPVerifyRequest ¶ added in v0.37.0
type TOTPVerifyRequest struct {
Code string `json:"code"`
}
TOTPVerifyRequest is the body of POST /api/auth/totp/verify.
type TOTPVerifyResponse ¶ added in v0.37.0
type TOTPVerifyResponse struct {
Valid bool `json:"valid"`
}
TOTPVerifyResponse reports a successful TOTP check.
type UnifiedScriptExecuteRequest ¶ added in v0.23.0
type UnifiedScriptExecuteRequest struct {
ScriptId string `json:"script_id,omitempty" msgpack:"script_id,omitempty"`
ScriptName string `json:"script_name,omitempty" msgpack:"script_name,omitempty"`
Content string `json:"content,omitempty" msgpack:"content,omitempty"`
Arguments []string `json:"arguments" msgpack:"arguments"`
}
type WriteFileRequest ¶ added in v0.23.0
type WriteFileRequest struct {
Path string `json:"path" msgpack:"path"`
Content string `json:"content" msgpack:"content"`
Mode string `json:"mode,omitempty" msgpack:"mode,omitempty"`
// SymlinkTarget, when set, creates a symlink at Path pointing to this
// target instead of writing content. Used by knot mirror for symlinks.
SymlinkTarget string `json:"symlink_target,omitempty" msgpack:"symlink_target,omitempty"`
// Sync metadata (optional). When set, the agent applies them after the
// write so the destination file matches the source's mtime and permission
// bits — used by knot sync tools (copy --recursive, watch).
MtimeNs int64 `json:"mtime_ns,omitempty" msgpack:"mtime_ns,omitempty"`
FilePerm uint32 `json:"file_perm,omitempty" msgpack:"file_perm,omitempty"`
}
type WriteFileResponse ¶ added in v0.23.0
Source Files
¶
- auditlogs.go
- auth.go
- backup.go
- chat_tools.go
- clusterinfo.go
- commands.go
- custom_field_options.go
- error-response.go
- event_sinks.go
- files.go
- files_events.go
- forward_target.go
- groups.go
- icons.go
- mcpservers.go
- methods.go
- permissions.go
- ping.go
- plugin_fields.go
- plugins.go
- pools.go
- roles.go
- routes.go
- scripts.go
- scripts_execution.go
- scripts_stream.go
- search.go
- server_info.go
- sessions.go
- skills.go
- space_file_ops.go
- space_files.go
- space_jobs.go
- space_restrictions.go
- space_run_command.go
- space_usage.go
- spaces.go
- specwizard.go
- sse.go
- stack_definitions.go
- template_export.go
- template_nodes.go
- templates.go
- templatevars.go
- tokens.go
- tunnels.go
- users.go
- volumes.go