跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

request-errors.go

54 行 · 1.7 KB历史下载
1package sftp
2
3type fxerr uint32
4
5// Error types that match the SFTP's SSH_FXP_STATUS codes. Gives you more
6// direct control of the errors being sent vs. letting the library work them
7// out from the standard os/io errors.
8const (
9 ErrSSHFxOk = fxerr(sshFxOk)
10 ErrSSHFxEOF = fxerr(sshFxEOF)
11 ErrSSHFxNoSuchFile = fxerr(sshFxNoSuchFile)
12 ErrSSHFxPermissionDenied = fxerr(sshFxPermissionDenied)
13 ErrSSHFxFailure = fxerr(sshFxFailure)
14 ErrSSHFxBadMessage = fxerr(sshFxBadMessage)
15 ErrSSHFxNoConnection = fxerr(sshFxNoConnection)
16 ErrSSHFxConnectionLost = fxerr(sshFxConnectionLost)
17 ErrSSHFxOpUnsupported = fxerr(sshFxOPUnsupported)
18)
19
20// Deprecated error types, these are aliases for the new ones, please use the new ones directly
21const (
22 ErrSshFxOk = ErrSSHFxOk
23 ErrSshFxEof = ErrSSHFxEOF
24 ErrSshFxNoSuchFile = ErrSSHFxNoSuchFile
25 ErrSshFxPermissionDenied = ErrSSHFxPermissionDenied
26 ErrSshFxFailure = ErrSSHFxFailure
27 ErrSshFxBadMessage = ErrSSHFxBadMessage
28 ErrSshFxNoConnection = ErrSSHFxNoConnection
29 ErrSshFxConnectionLost = ErrSSHFxConnectionLost
30 ErrSshFxOpUnsupported = ErrSSHFxOpUnsupported
31)
32
33func (e fxerr) Error() string {
34 switch e {
35 case ErrSSHFxOk:
36 return "OK"
37 case ErrSSHFxEOF:
38 return "EOF"
39 case ErrSSHFxNoSuchFile:
40 return "no such file"
41 case ErrSSHFxPermissionDenied:
42 return "permission denied"
43 case ErrSSHFxBadMessage:
44 return "bad message"
45 case ErrSSHFxNoConnection:
46 return "no connection"
47 case ErrSSHFxConnectionLost:
48 return "connection lost"
49 case ErrSSHFxOpUnsupported:
50 return "operation unsupported"
51 default:
52 return "failure"
53 }
54}