sshfx

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttrSize = 1 << iota
	AttrUIDGID
	AttrPermissions
	AttrACModTime

	AttrExtended = 1 << 31
)
View Source
const (
	DefaultMaxPacketLength = 34000

	DefaultMaxDataLength = 32768
)
View Source
const (
	StatusOK = Status(iota)
	StatusEOF
	StatusNoSuchFile
	StatusPermissionDenied
	StatusFailure
	StatusBadMessage
	StatusNoConnection
	StatusConnectionLost
	StatusOPUnsupported

	StatusV4InvalidHandle
	StatusV4NoSuchPath
	StatusV4FileAlreadyExists
	StatusV4WriteProtect

	StatusV4NoMedia

	StatusV5NoSpaceOnFilesystem
	StatusV5QuotaExceeded
	StatusV5UnknownPrincipal
	StatusV5LockConflict

	StatusV6DirNotEmpty
	StatusV6NotADirectory
	StatusV6InvalidFilename
	StatusV6LinkLoop

	StatusV6CannotDelete
	StatusV6InvalidParameter
	StatusV6FileIsADirectory
	StatusV6ByteRangeLockConflict
	StatusV6ByteRangeLockRefused
	StatusV6DeletePending

	StatusV6FileCorrupt

	StatusV6OwnerInvalid
	StatusV6GroupInvalid

	StatusV6NoMatchingByteRangeLock
)
View Source
const (
	PacketTypeInit = PacketType(iota + 1)
	PacketTypeVersion
	PacketTypeOpen
	PacketTypeClose
	PacketTypeRead
	PacketTypeWrite
	PacketTypeLStat
	PacketTypeFStat
	PacketTypeSetstat
	PacketTypeFSetstat
	PacketTypeOpenDir
	PacketTypeReadDir
	PacketTypeRemove
	PacketTypeMkdir
	PacketTypeRmdir
	PacketTypeRealPath
	PacketTypeStat
	PacketTypeRename
	PacketTypeReadLink
	PacketTypeSymlink

	PacketTypeV6Link

	PacketTypeV6Block
	PacketTypeV6Unblock
)
View Source
const (
	PacketTypeStatus = PacketType(iota + 101)
	PacketTypeHandle
	PacketTypeData
	PacketTypeName
	PacketTypeAttrs
)
View Source
const (
	PacketTypeExtended = PacketType(iota + 200)
	PacketTypeExtendedReply
)
View Source
const (
	FlagRead = 1 << iota
	FlagWrite
	FlagAppend
	FlagCreate
	FlagTruncate
	FlagExclusive
)

Variables

View Source
var (
	ErrShortPacket = errors.New("packet too short")

	ErrLongPacket = errors.New("packet too long")
)

Functions

func ComposePacket

func ComposePacket(header, payload []byte, err error) ([]byte, error)

func RegisterExtendedPacketType

func RegisterExtendedPacketType(extension string, constructor ExtendedDataConstructor)

Types

type Attributes

type Attributes struct {
	Flags uint32

	Size uint64

	UID uint32
	GID uint32

	Permissions FileMode

	ATime uint32
	MTime uint32

	ExtendedAttributes []ExtendedAttribute
}

func (*Attributes) GetACModTime

func (a *Attributes) GetACModTime() (atime, mtime uint32, ok bool)

func (*Attributes) GetPermissions

func (a *Attributes) GetPermissions() (perms FileMode, ok bool)

func (*Attributes) GetSize

func (a *Attributes) GetSize() (size uint64, ok bool)

func (*Attributes) GetUIDGID

func (a *Attributes) GetUIDGID() (uid, gid uint32, ok bool)

func (*Attributes) Len

func (a *Attributes) Len() int

func (*Attributes) MarshalBinary

func (a *Attributes) MarshalBinary() ([]byte, error)

func (*Attributes) MarshalInto

func (a *Attributes) MarshalInto(buf *Buffer)

func (*Attributes) SetACModTime

func (a *Attributes) SetACModTime(atime, mtime uint32)

func (*Attributes) SetPermissions

func (a *Attributes) SetPermissions(perms FileMode)

func (*Attributes) SetSize

func (a *Attributes) SetSize(size uint64)

func (*Attributes) SetUIDGID

func (a *Attributes) SetUIDGID(uid, gid uint32)

func (*Attributes) UnmarshalBinary

func (a *Attributes) UnmarshalBinary(data []byte) error

func (*Attributes) UnmarshalFrom

func (a *Attributes) UnmarshalFrom(buf *Buffer) (err error)

func (*Attributes) XXX_UnmarshalByFlags

func (a *Attributes) XXX_UnmarshalByFlags(flags uint32, buf *Buffer) (err error)

type AttrsPacket

type AttrsPacket struct {
	Attrs Attributes
}

func (*AttrsPacket) MarshalPacket

func (p *AttrsPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*AttrsPacket) Type

func (p *AttrsPacket) Type() PacketType

func (*AttrsPacket) UnmarshalPacketBody

func (p *AttrsPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type Buffer

type Buffer struct {
	Err error
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer(buf []byte) *Buffer

func NewMarshalBuffer

func NewMarshalBuffer(size int) *Buffer

func (*Buffer) AppendBool

func (b *Buffer) AppendBool(v bool)

func (*Buffer) AppendByteSlice

func (b *Buffer) AppendByteSlice(v []byte)

func (*Buffer) AppendCount

func (b *Buffer) AppendCount(v int)

func (*Buffer) AppendInt64

func (b *Buffer) AppendInt64(v int64)

func (*Buffer) AppendString

func (b *Buffer) AppendString(v string)

func (*Buffer) AppendUint8

func (b *Buffer) AppendUint8(v uint8)

func (*Buffer) AppendUint16

func (b *Buffer) AppendUint16(v uint16)

func (*Buffer) AppendUint32

func (b *Buffer) AppendUint32(v uint32)

func (*Buffer) AppendUint64

func (b *Buffer) AppendUint64(v uint64)

func (*Buffer) Bytes

func (b *Buffer) Bytes() []byte

func (*Buffer) Cap

func (b *Buffer) Cap() int

func (*Buffer) ConsumeBool

func (b *Buffer) ConsumeBool() bool

func (*Buffer) ConsumeByteSlice

func (b *Buffer) ConsumeByteSlice() []byte

func (*Buffer) ConsumeByteSliceCopy

func (b *Buffer) ConsumeByteSliceCopy(hint []byte) []byte

func (*Buffer) ConsumeCount

func (b *Buffer) ConsumeCount() int

func (*Buffer) ConsumeInt64

func (b *Buffer) ConsumeInt64() int64

func (*Buffer) ConsumeString

func (b *Buffer) ConsumeString() string

func (*Buffer) ConsumeUint8

func (b *Buffer) ConsumeUint8() uint8

func (*Buffer) ConsumeUint16

func (b *Buffer) ConsumeUint16() uint16

func (*Buffer) ConsumeUint32

func (b *Buffer) ConsumeUint32() uint32

func (*Buffer) ConsumeUint64

func (b *Buffer) ConsumeUint64() uint64

func (*Buffer) Len

func (b *Buffer) Len() int

func (*Buffer) MarshalBinary

func (b *Buffer) MarshalBinary() ([]byte, error)

func (*Buffer) Packet

func (b *Buffer) Packet(payload []byte) (header, payloadPassThru []byte, err error)

func (*Buffer) PutLength

func (b *Buffer) PutLength(size int)

func (*Buffer) Reset

func (b *Buffer) Reset()

func (*Buffer) StartPacket

func (b *Buffer) StartPacket(packetType PacketType, requestID uint32)

func (*Buffer) UnmarshalBinary

func (b *Buffer) UnmarshalBinary(data []byte) error

type ClosePacket

type ClosePacket struct {
	Handle string
}

func (*ClosePacket) MarshalPacket

func (p *ClosePacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*ClosePacket) Type

func (p *ClosePacket) Type() PacketType

func (*ClosePacket) UnmarshalPacketBody

func (p *ClosePacket) UnmarshalPacketBody(buf *Buffer) (err error)

type DataPacket

type DataPacket struct {
	Data []byte
}

func (*DataPacket) MarshalPacket

func (p *DataPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*DataPacket) Type

func (p *DataPacket) Type() PacketType

func (*DataPacket) UnmarshalPacketBody

func (p *DataPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type ExtendedAttribute

type ExtendedAttribute struct {
	Type string
	Data string
}

func (*ExtendedAttribute) Len

func (e *ExtendedAttribute) Len() int

func (*ExtendedAttribute) MarshalBinary

func (e *ExtendedAttribute) MarshalBinary() ([]byte, error)

func (*ExtendedAttribute) MarshalInto

func (e *ExtendedAttribute) MarshalInto(buf *Buffer)

func (*ExtendedAttribute) UnmarshalBinary

func (e *ExtendedAttribute) UnmarshalBinary(data []byte) error

func (*ExtendedAttribute) UnmarshalFrom

func (e *ExtendedAttribute) UnmarshalFrom(buf *Buffer) (err error)

type ExtendedData

type ExtendedData = interface {
	encoding.BinaryMarshaler
	encoding.BinaryUnmarshaler
}

type ExtendedDataConstructor

type ExtendedDataConstructor func() ExtendedData

type ExtendedPacket

type ExtendedPacket struct {
	ExtendedRequest string

	Data ExtendedData
}

func (*ExtendedPacket) MarshalPacket

func (p *ExtendedPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*ExtendedPacket) Type

func (p *ExtendedPacket) Type() PacketType

func (*ExtendedPacket) UnmarshalPacketBody

func (p *ExtendedPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type ExtendedReplyPacket

type ExtendedReplyPacket struct {
	Data ExtendedData
}

func (*ExtendedReplyPacket) MarshalPacket

func (p *ExtendedReplyPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*ExtendedReplyPacket) Type

func (p *ExtendedReplyPacket) Type() PacketType

func (*ExtendedReplyPacket) UnmarshalPacketBody

func (p *ExtendedReplyPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type ExtensionPair

type ExtensionPair struct {
	Name string
	Data string
}

func (*ExtensionPair) Len

func (e *ExtensionPair) Len() int

func (*ExtensionPair) MarshalBinary

func (e *ExtensionPair) MarshalBinary() ([]byte, error)

func (*ExtensionPair) MarshalInto

func (e *ExtensionPair) MarshalInto(buf *Buffer)

func (*ExtensionPair) UnmarshalBinary

func (e *ExtensionPair) UnmarshalBinary(data []byte) error

func (*ExtensionPair) UnmarshalFrom

func (e *ExtensionPair) UnmarshalFrom(buf *Buffer) (err error)

type FSetstatPacket

type FSetstatPacket struct {
	Handle string
	Attrs  Attributes
}

func (*FSetstatPacket) MarshalPacket

func (p *FSetstatPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*FSetstatPacket) Type

func (p *FSetstatPacket) Type() PacketType

func (*FSetstatPacket) UnmarshalPacketBody

func (p *FSetstatPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type FStatPacket

type FStatPacket struct {
	Handle string
}

func (*FStatPacket) MarshalPacket

func (p *FStatPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*FStatPacket) Type

func (p *FStatPacket) Type() PacketType

func (*FStatPacket) UnmarshalPacketBody

func (p *FStatPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type FileMode

type FileMode uint32
const (
	ModePerm FileMode = 0o0777

	ModeUserRead FileMode = 0o0400

	ModeUserWrite FileMode = 0o0200

	ModeUserExec FileMode = 0o0100

	ModeGroupRead FileMode = 0o0040

	ModeGroupWrite FileMode = 0o0020

	ModeGroupExec FileMode = 0o0010

	ModeOtherRead FileMode = 0o0004

	ModeOtherWrite FileMode = 0o0002

	ModeOtherExec FileMode = 0o0001

	ModeSetUID FileMode = 0o4000

	ModeSetGID FileMode = 0o2000

	ModeSticky FileMode = 0o1000

	ModeType FileMode = 0xF000

	ModeNamedPipe FileMode = 0x1000

	ModeCharDevice FileMode = 0x2000

	ModeDir FileMode = 0x4000

	ModeDevice FileMode = 0x6000

	ModeRegular FileMode = 0x8000

	ModeSymlink FileMode = 0xA000

	ModeSocket FileMode = 0xC000
)

func (FileMode) IsDir

func (m FileMode) IsDir() bool

func (FileMode) IsRegular

func (m FileMode) IsRegular() bool

func (FileMode) Perm

func (m FileMode) Perm() FileMode

func (FileMode) String

func (m FileMode) String() string

func (FileMode) Type

func (m FileMode) Type() FileMode

type HandlePacket

type HandlePacket struct {
	Handle string
}

func (*HandlePacket) MarshalPacket

func (p *HandlePacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*HandlePacket) Type

func (p *HandlePacket) Type() PacketType

func (*HandlePacket) UnmarshalPacketBody

func (p *HandlePacket) UnmarshalPacketBody(buf *Buffer) (err error)

type InitPacket

type InitPacket struct {
	Version    uint32
	Extensions []*ExtensionPair
}

func (*InitPacket) MarshalBinary

func (p *InitPacket) MarshalBinary() ([]byte, error)

func (*InitPacket) UnmarshalBinary

func (p *InitPacket) UnmarshalBinary(data []byte) (err error)

type LStatPacket

type LStatPacket struct {
	Path string
}

func (*LStatPacket) MarshalPacket

func (p *LStatPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*LStatPacket) Type

func (p *LStatPacket) Type() PacketType

func (*LStatPacket) UnmarshalPacketBody

func (p *LStatPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type MkdirPacket

type MkdirPacket struct {
	Path  string
	Attrs Attributes
}

func (*MkdirPacket) MarshalPacket

func (p *MkdirPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*MkdirPacket) Type

func (p *MkdirPacket) Type() PacketType

func (*MkdirPacket) UnmarshalPacketBody

func (p *MkdirPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type NameEntry

type NameEntry struct {
	Filename string
	Longname string
	Attrs    Attributes
}

func (*NameEntry) Len

func (e *NameEntry) Len() int

func (*NameEntry) MarshalBinary

func (e *NameEntry) MarshalBinary() ([]byte, error)

func (*NameEntry) MarshalInto

func (e *NameEntry) MarshalInto(buf *Buffer)

func (*NameEntry) UnmarshalBinary

func (e *NameEntry) UnmarshalBinary(data []byte) error

func (*NameEntry) UnmarshalFrom

func (e *NameEntry) UnmarshalFrom(buf *Buffer) (err error)

type NamePacket

type NamePacket struct {
	Entries []*NameEntry
}

func (*NamePacket) MarshalPacket

func (p *NamePacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*NamePacket) Type

func (p *NamePacket) Type() PacketType

func (*NamePacket) UnmarshalPacketBody

func (p *NamePacket) UnmarshalPacketBody(buf *Buffer) (err error)

type OpenDirPacket

type OpenDirPacket struct {
	Path string
}

func (*OpenDirPacket) MarshalPacket

func (p *OpenDirPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*OpenDirPacket) Type

func (p *OpenDirPacket) Type() PacketType

func (*OpenDirPacket) UnmarshalPacketBody

func (p *OpenDirPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type OpenPacket

type OpenPacket struct {
	Filename string
	PFlags   uint32
	Attrs    Attributes
}

func (*OpenPacket) MarshalPacket

func (p *OpenPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*OpenPacket) Type

func (p *OpenPacket) Type() PacketType

func (*OpenPacket) UnmarshalPacketBody

func (p *OpenPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type Packet

type Packet interface {
	PacketMarshaller

	Type() PacketType

	UnmarshalPacketBody(buf *Buffer) error
}

type PacketMarshaller

type PacketMarshaller interface {
	MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)
}

type PacketType

type PacketType uint8

func (PacketType) String

func (f PacketType) String() string

type RawPacket

type RawPacket struct {
	PacketType PacketType
	RequestID  uint32

	Data Buffer
}

func (*RawPacket) MarshalBinary

func (p *RawPacket) MarshalBinary() ([]byte, error)

func (*RawPacket) MarshalPacket

func (p *RawPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*RawPacket) ReadPacket added in v0.0.5

func (p *RawPacket) ReadPacket(r io.Reader, b []byte, maxPacketLength uint32) error

func (*RawPacket) Reset

func (p *RawPacket) Reset()

func (*RawPacket) Type

func (p *RawPacket) Type() PacketType

func (*RawPacket) UnmarshalBinary

func (p *RawPacket) UnmarshalBinary(data []byte) error

func (*RawPacket) UnmarshalFrom

func (p *RawPacket) UnmarshalFrom(buf *Buffer) error

type ReadDirPacket

type ReadDirPacket struct {
	Handle string
}

func (*ReadDirPacket) MarshalPacket

func (p *ReadDirPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*ReadDirPacket) Type

func (p *ReadDirPacket) Type() PacketType

func (*ReadDirPacket) UnmarshalPacketBody

func (p *ReadDirPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type ReadLinkPacket

type ReadLinkPacket struct {
	Path string
}

func (*ReadLinkPacket) MarshalPacket

func (p *ReadLinkPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*ReadLinkPacket) Type

func (p *ReadLinkPacket) Type() PacketType

func (*ReadLinkPacket) UnmarshalPacketBody

func (p *ReadLinkPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type ReadPacket

type ReadPacket struct {
	Handle string
	Offset uint64
	Length uint32
}

func (*ReadPacket) MarshalPacket

func (p *ReadPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*ReadPacket) Type

func (p *ReadPacket) Type() PacketType

func (*ReadPacket) UnmarshalPacketBody

func (p *ReadPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type RealPathPacket

type RealPathPacket struct {
	Path string
}

func (*RealPathPacket) MarshalPacket

func (p *RealPathPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*RealPathPacket) Type

func (p *RealPathPacket) Type() PacketType

func (*RealPathPacket) UnmarshalPacketBody

func (p *RealPathPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type RemovePacket

type RemovePacket struct {
	Path string
}

func (*RemovePacket) MarshalPacket

func (p *RemovePacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*RemovePacket) Type

func (p *RemovePacket) Type() PacketType

func (*RemovePacket) UnmarshalPacketBody

func (p *RemovePacket) UnmarshalPacketBody(buf *Buffer) (err error)

type RenamePacket

type RenamePacket struct {
	OldPath string
	NewPath string
}

func (*RenamePacket) MarshalPacket

func (p *RenamePacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*RenamePacket) Type

func (p *RenamePacket) Type() PacketType

func (*RenamePacket) UnmarshalPacketBody

func (p *RenamePacket) UnmarshalPacketBody(buf *Buffer) (err error)

type RequestPacket

type RequestPacket struct {
	RequestID uint32

	Request Packet
}

func (*RequestPacket) MarshalBinary

func (p *RequestPacket) MarshalBinary() ([]byte, error)

func (*RequestPacket) MarshalPacket

func (p *RequestPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*RequestPacket) ReadPacket added in v0.0.5

func (p *RequestPacket) ReadPacket(r io.Reader, b []byte, maxPacketLength uint32) error

func (*RequestPacket) Reset

func (p *RequestPacket) Reset()

func (*RequestPacket) Type

func (p *RequestPacket) Type() PacketType

func (*RequestPacket) UnmarshalBinary

func (p *RequestPacket) UnmarshalBinary(data []byte) error

func (*RequestPacket) UnmarshalFrom

func (p *RequestPacket) UnmarshalFrom(buf *Buffer) error

type RmdirPacket

type RmdirPacket struct {
	Path string
}

func (*RmdirPacket) MarshalPacket

func (p *RmdirPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*RmdirPacket) Type

func (p *RmdirPacket) Type() PacketType

func (*RmdirPacket) UnmarshalPacketBody

func (p *RmdirPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type SetstatPacket

type SetstatPacket struct {
	Path  string
	Attrs Attributes
}

func (*SetstatPacket) MarshalPacket

func (p *SetstatPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*SetstatPacket) Type

func (p *SetstatPacket) Type() PacketType

func (*SetstatPacket) UnmarshalPacketBody

func (p *SetstatPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type StatPacket

type StatPacket struct {
	Path string
}

func (*StatPacket) MarshalPacket

func (p *StatPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*StatPacket) Type

func (p *StatPacket) Type() PacketType

func (*StatPacket) UnmarshalPacketBody

func (p *StatPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type Status

type Status uint32

func (Status) Error

func (s Status) Error() string

func (Status) Is

func (s Status) Is(target error) bool

func (Status) String

func (s Status) String() string

type StatusPacket

type StatusPacket struct {
	StatusCode   Status
	ErrorMessage string
	LanguageTag  string
}

func (*StatusPacket) Error

func (p *StatusPacket) Error() string

func (*StatusPacket) Is

func (p *StatusPacket) Is(target error) bool

func (*StatusPacket) MarshalPacket

func (p *StatusPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*StatusPacket) Type

func (p *StatusPacket) Type() PacketType

func (*StatusPacket) UnmarshalPacketBody

func (p *StatusPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type SymlinkPacket

type SymlinkPacket struct {
	LinkPath   string
	TargetPath string
}

func (*SymlinkPacket) MarshalPacket

func (p *SymlinkPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*SymlinkPacket) Type

func (p *SymlinkPacket) Type() PacketType

func (*SymlinkPacket) UnmarshalPacketBody

func (p *SymlinkPacket) UnmarshalPacketBody(buf *Buffer) (err error)

type VersionPacket

type VersionPacket struct {
	Version    uint32
	Extensions []*ExtensionPair
}

func (*VersionPacket) MarshalBinary

func (p *VersionPacket) MarshalBinary() ([]byte, error)

func (*VersionPacket) UnmarshalBinary

func (p *VersionPacket) UnmarshalBinary(data []byte) (err error)

type WritePacket

type WritePacket struct {
	Handle string
	Offset uint64
	Data   []byte
}

func (*WritePacket) MarshalPacket

func (p *WritePacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

func (*WritePacket) Type

func (p *WritePacket) Type() PacketType

func (*WritePacket) UnmarshalPacketBody

func (p *WritePacket) UnmarshalPacketBody(buf *Buffer) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址