Documentation ¶
Index ¶
- Constants
- Variables
- func WritePacket(w io.Writer, m Packet) error
- type FileStat
- type FxVersionPacket
- type FxpClosePacket
- type FxpDataPacket
- type FxpFSetStatPacket
- type FxpFstatPacket
- type FxpHandlePacket
- type FxpInitPacket
- type FxpLstatPacket
- type FxpMkdirPacket
- type FxpNameAttr
- type FxpNamePacket
- type FxpOpenPacket
- type FxpOpendirPacket
- type FxpReadPacket
- type FxpReaddirPacket
- type FxpReadlinkPacket
- type FxpRealpathPacket
- type FxpRemovePacket
- type FxpRenamePacket
- type FxpRmdirPacket
- type FxpSetStatPacket
- type FxpStatPacket
- type FxpStatResponse
- type FxpStatusPacket
- type FxpSymlinkPacket
- type FxpWritePacket
- type Packet
- type StatExtended
- type StatusError
Constants ¶
View Source
const ( FXP_INIT = 1 FXP_VERSION = 2 FXP_OPEN = 3 FXP_CLOSE = 4 FXP_READ = 5 FXP_WRITE = 6 FXP_LSTAT = 7 FXP_FSTAT = 8 FXP_SETSTAT = 9 FXP_FSETSTAT = 10 FXP_OPENDIR = 11 FXP_READDIR = 12 FXP_REMOVE = 13 FXP_MKDIR = 14 FXP_RMDIR = 15 FXP_REALPATH = 16 FXP_STAT = 17 FXP_RENAME = 18 FXP_READLINK = 19 FXP_SYMLINK = 20 FXP_STATUS = 101 FXP_HANDLE = 102 FXP_DATA = 103 FXP_NAME = 104 FXP_ATTRS = 105 FXP_EXTENDED = 200 FXP_EXTENDED_REPLY = 201 )
View Source
const ( FX_OK = 0 FX_EOF = 1 FX_NO_SUCH_FILE = 2 FX_PERMISSION_DENIED = 3 FX_FAILURE = 4 FX_BAD_MESSAGE = 5 FX_NO_CONNECTION = 6 FX_CONNECTION_LOST = 7 FX_OP_UNSUPPORTED = 8 // see draft-ietf-secsh-filexfer-13 // https://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-9.1 FX_INVALID_HANDLE = 9 FX_NO_SUCH_PATH = 10 FX_FILE_ALREADY_EXISTS = 11 FX_WRITE_PROTECT = 12 FX_NO_MEDIA = 13 FX_NO_SPACE_ON_FILESYSTEM = 14 FX_QUOTA_EXCEEDED = 15 FX_UNKNOWN_PRINCIPAL = 16 FX_LOCK_CONFLICT = 17 FX_DIR_NOT_EMPTY = 18 FX_NOT_A_DIRECTORY = 19 FX_INVALID_FILENAME = 20 FX_LINK_LOOP = 21 FX_CANNOT_DELETE = 22 FX_INVALID_PARAMETER = 23 FX_FILE_IS_A_DIRECTORY = 24 FX_BYTE_RANGE_LOCK_CONFLICT = 25 FX_BYTE_RANGE_LOCK_REFUSED = 26 FX_DELETE_PENDING = 27 FX_FILE_CORRUPT = 28 FX_OWNER_INVALID = 29 FX_GROUP_INVALID = 30 FX_NO_MATCHING_BYTE_RANGE_LOCK = 31 )
View Source
const ( FXF_READ = 0x00000001 FXF_WRITE = 0x00000002 FXF_APPEND = 0x00000004 FXF_CREAT = 0x00000008 FXF_TRUNC = 0x00000010 FXF_EXCL = 0x00000020 )
View Source
const ( FILEXFER_ATTR_SIZE = 0x00000001 FILEXFER_ATTR_UIDGID = 0x00000002 FILEXFER_ATTR_PERMISSIONS = 0x00000004 FILEXFER_ATTR_ACMODTIME = 0x00000008 FILEXFER_ATTR_EXTENDED = 0x80000000 )
View Source
const ( S_IFMT = 00170000 S_IFSOCK = 0140000 S_IFLNK = 0120000 S_IFREG = 0100000 S_IFBLK = 0060000 S_IFDIR = 0040000 S_IFCHR = 0020000 S_IFIFO = 0010000 S_ISUID = 0004000 S_ISGID = 0002000 S_ISVTX = 0001000 )
View Source
const ProtocolVersion = 3
Variables ¶
View Source
var EmptyFileStat = FileStat{}
Functions ¶
Types ¶
type FxVersionPacket ¶
func (FxVersionPacket) MarshalBinary ¶
func (p FxVersionPacket) MarshalBinary() ([]byte, error)
func (FxVersionPacket) UnmarshalBinary ¶
func (p FxVersionPacket) UnmarshalBinary(b []byte) error
type FxpClosePacket ¶
func (FxpClosePacket) MarshalBinary ¶
func (p FxpClosePacket) MarshalBinary() ([]byte, error)
func (*FxpClosePacket) UnmarshalBinary ¶
func (p *FxpClosePacket) UnmarshalBinary(b []byte) error
type FxpDataPacket ¶
func (FxpDataPacket) MarshalBinary ¶
func (p FxpDataPacket) MarshalBinary() ([]byte, error)
func (*FxpDataPacket) UnmarshalBinary ¶
func (p *FxpDataPacket) UnmarshalBinary(b []byte) error
type FxpFSetStatPacket ¶
func (FxpFSetStatPacket) MarshalBinary ¶
func (p FxpFSetStatPacket) MarshalBinary() ([]byte, error)
func (*FxpFSetStatPacket) UnmarshalBinary ¶
func (p *FxpFSetStatPacket) UnmarshalBinary(b []byte) error
type FxpFstatPacket ¶
func (FxpFstatPacket) MarshalBinary ¶
func (p FxpFstatPacket) MarshalBinary() ([]byte, error)
func (*FxpFstatPacket) UnmarshalBinary ¶
func (p *FxpFstatPacket) UnmarshalBinary(b []byte) error
type FxpHandlePacket ¶
func (FxpHandlePacket) MarshalBinary ¶
func (p FxpHandlePacket) MarshalBinary() ([]byte, error)
func (*FxpHandlePacket) UnmarshalBinary ¶
func (p *FxpHandlePacket) UnmarshalBinary(b []byte) error
type FxpInitPacket ¶
type FxpInitPacket struct { Version uint32 Extensions []extensionPair }
func (FxpInitPacket) MarshalBinary ¶
func (p FxpInitPacket) MarshalBinary() ([]byte, error)
func (*FxpInitPacket) UnmarshalBinary ¶
func (p *FxpInitPacket) UnmarshalBinary(b []byte) error
type FxpLstatPacket ¶
func (FxpLstatPacket) MarshalBinary ¶
func (p FxpLstatPacket) MarshalBinary() ([]byte, error)
func (*FxpLstatPacket) UnmarshalBinary ¶
func (p *FxpLstatPacket) UnmarshalBinary(b []byte) error
type FxpMkdirPacket ¶
func (FxpMkdirPacket) MarshalBinary ¶
func (p FxpMkdirPacket) MarshalBinary() ([]byte, error)
func (*FxpMkdirPacket) UnmarshalBinary ¶
func (p *FxpMkdirPacket) UnmarshalBinary(b []byte) error
type FxpNameAttr ¶
func (FxpNameAttr) MarshalBinary ¶
func (p FxpNameAttr) MarshalBinary() ([]byte, error)
type FxpNamePacket ¶
type FxpNamePacket struct { ID uint32 NameAttrs []FxpNameAttr }
func (FxpNamePacket) MarshalBinary ¶
func (p FxpNamePacket) MarshalBinary() ([]byte, error)
func (FxpNamePacket) UnmarshalBinary ¶
func (p FxpNamePacket) UnmarshalBinary(b []byte) error
type FxpOpenPacket ¶
func (FxpOpenPacket) MarshalBinary ¶
func (p FxpOpenPacket) MarshalBinary() ([]byte, error)
func (*FxpOpenPacket) UnmarshalBinary ¶
func (p *FxpOpenPacket) UnmarshalBinary(b []byte) error
type FxpOpendirPacket ¶
func (FxpOpendirPacket) MarshalBinary ¶
func (p FxpOpendirPacket) MarshalBinary() ([]byte, error)
func (*FxpOpendirPacket) UnmarshalBinary ¶
func (p *FxpOpendirPacket) UnmarshalBinary(b []byte) error
type FxpReadPacket ¶
func (FxpReadPacket) MarshalBinary ¶
func (p FxpReadPacket) MarshalBinary() ([]byte, error)
func (*FxpReadPacket) UnmarshalBinary ¶
func (p *FxpReadPacket) UnmarshalBinary(b []byte) error
type FxpReaddirPacket ¶
func (FxpReaddirPacket) MarshalBinary ¶
func (p FxpReaddirPacket) MarshalBinary() ([]byte, error)
func (*FxpReaddirPacket) UnmarshalBinary ¶
func (p *FxpReaddirPacket) UnmarshalBinary(b []byte) error
type FxpReadlinkPacket ¶
func (FxpReadlinkPacket) MarshalBinary ¶
func (p FxpReadlinkPacket) MarshalBinary() ([]byte, error)
func (*FxpReadlinkPacket) UnmarshalBinary ¶
func (p *FxpReadlinkPacket) UnmarshalBinary(b []byte) error
type FxpRealpathPacket ¶
func (FxpRealpathPacket) MarshalBinary ¶
func (p FxpRealpathPacket) MarshalBinary() ([]byte, error)
func (*FxpRealpathPacket) UnmarshalBinary ¶
func (p *FxpRealpathPacket) UnmarshalBinary(b []byte) error
type FxpRemovePacket ¶
func (FxpRemovePacket) MarshalBinary ¶
func (p FxpRemovePacket) MarshalBinary() ([]byte, error)
func (*FxpRemovePacket) UnmarshalBinary ¶
func (p *FxpRemovePacket) UnmarshalBinary(b []byte) error
type FxpRenamePacket ¶
func (FxpRenamePacket) MarshalBinary ¶
func (p FxpRenamePacket) MarshalBinary() ([]byte, error)
func (*FxpRenamePacket) UnmarshalBinary ¶
func (p *FxpRenamePacket) UnmarshalBinary(b []byte) error
type FxpRmdirPacket ¶
func (FxpRmdirPacket) MarshalBinary ¶
func (p FxpRmdirPacket) MarshalBinary() ([]byte, error)
func (*FxpRmdirPacket) UnmarshalBinary ¶
func (p *FxpRmdirPacket) UnmarshalBinary(b []byte) error
type FxpSetStatPacket ¶
func (FxpSetStatPacket) MarshalBinary ¶
func (p FxpSetStatPacket) MarshalBinary() ([]byte, error)
func (*FxpSetStatPacket) UnmarshalBinary ¶
func (p *FxpSetStatPacket) UnmarshalBinary(b []byte) error
type FxpStatPacket ¶
func (FxpStatPacket) MarshalBinary ¶
func (p FxpStatPacket) MarshalBinary() ([]byte, error)
func (*FxpStatPacket) UnmarshalBinary ¶
func (p *FxpStatPacket) UnmarshalBinary(b []byte) error
type FxpStatResponse ¶
func (FxpStatResponse) MarshalBinary ¶
func (p FxpStatResponse) MarshalBinary() ([]byte, error)
func (FxpStatResponse) UnmarshalBinary ¶
func (p FxpStatResponse) UnmarshalBinary(b []byte) error
type FxpStatusPacket ¶
type FxpStatusPacket struct { ID uint32 StatusError StatusError }
func MakeStatus ¶
func MakeStatus(id uint32, msg string, code uint32) *FxpStatusPacket
func (FxpStatusPacket) MarshalBinary ¶
func (p FxpStatusPacket) MarshalBinary() ([]byte, error)
func (FxpStatusPacket) UnmarshalBinary ¶
func (p FxpStatusPacket) UnmarshalBinary(b []byte) error
type FxpSymlinkPacket ¶
func (FxpSymlinkPacket) MarshalBinary ¶
func (p FxpSymlinkPacket) MarshalBinary() ([]byte, error)
func (*FxpSymlinkPacket) UnmarshalBinary ¶
func (p *FxpSymlinkPacket) UnmarshalBinary(b []byte) error
type FxpWritePacket ¶
func (FxpWritePacket) MarshalBinary ¶
func (p FxpWritePacket) MarshalBinary() ([]byte, error)
func (*FxpWritePacket) UnmarshalBinary ¶
func (p *FxpWritePacket) UnmarshalBinary(b []byte) error
type Packet ¶
type Packet interface { encoding.BinaryMarshaler encoding.BinaryUnmarshaler }
type StatExtended ¶
type StatusError ¶
A StatusError is returned when an SFTP operation fails, and provides additional information about the failure.
func (*StatusError) Error ¶
func (s *StatusError) Error() string
Click to show internal directories.
Click to hide internal directories.