Documentation
¶
Index ¶
- Constants
- Variables
- func ComposePacket(header, payload []byte, err error) ([]byte, error)
- func RegisterExtendedPacketType(extension string, constructor ExtendedDataConstructor)
- type Attributes
- func (a *Attributes) GetACModTime() (atime, mtime uint32, ok bool)
- func (a *Attributes) GetPermissions() (perms FileMode, ok bool)
- func (a *Attributes) GetSize() (size uint64, ok bool)
- func (a *Attributes) GetUIDGID() (uid, gid uint32, ok bool)
- func (a *Attributes) Len() int
- func (a *Attributes) MarshalBinary() ([]byte, error)
- func (a *Attributes) MarshalInto(buf *Buffer)
- func (a *Attributes) SetACModTime(atime, mtime uint32)
- func (a *Attributes) SetPermissions(perms FileMode)
- func (a *Attributes) SetSize(size uint64)
- func (a *Attributes) SetUIDGID(uid, gid uint32)
- func (a *Attributes) UnmarshalBinary(data []byte) error
- func (a *Attributes) UnmarshalFrom(buf *Buffer) (err error)
- func (a *Attributes) XXX_UnmarshalByFlags(flags uint32, buf *Buffer) (err error)
- type AttrsPacket
- type Buffer
- func (b *Buffer) AppendBool(v bool)
- func (b *Buffer) AppendByteSlice(v []byte)
- func (b *Buffer) AppendCount(v int)
- func (b *Buffer) AppendInt64(v int64)
- func (b *Buffer) AppendString(v string)
- func (b *Buffer) AppendUint8(v uint8)
- func (b *Buffer) AppendUint16(v uint16)
- func (b *Buffer) AppendUint32(v uint32)
- func (b *Buffer) AppendUint64(v uint64)
- func (b *Buffer) Bytes() []byte
- func (b *Buffer) Cap() int
- func (b *Buffer) ConsumeBool() bool
- func (b *Buffer) ConsumeByteSlice() []byte
- func (b *Buffer) ConsumeByteSliceCopy(hint []byte) []byte
- func (b *Buffer) ConsumeCount() int
- func (b *Buffer) ConsumeInt64() int64
- func (b *Buffer) ConsumeString() string
- func (b *Buffer) ConsumeUint8() uint8
- func (b *Buffer) ConsumeUint16() uint16
- func (b *Buffer) ConsumeUint32() uint32
- func (b *Buffer) ConsumeUint64() uint64
- func (b *Buffer) Len() int
- func (b *Buffer) MarshalBinary() ([]byte, error)
- func (b *Buffer) Packet(payload []byte) (header, payloadPassThru []byte, err error)
- func (b *Buffer) PutLength(size int)
- func (b *Buffer) Reset()
- func (b *Buffer) StartPacket(packetType PacketType, requestID uint32)
- func (b *Buffer) UnmarshalBinary(data []byte) error
- type ClosePacket
- type DataPacket
- type ExtendedAttribute
- type ExtendedData
- type ExtendedDataConstructor
- type ExtendedPacket
- type ExtendedReplyPacket
- type ExtensionPair
- type FSetstatPacket
- type FStatPacket
- type FileMode
- type HandlePacket
- type InitPacket
- type LStatPacket
- type MkdirPacket
- type NameEntry
- type NamePacket
- type OpenDirPacket
- type OpenPacket
- type Packet
- type PacketMarshaller
- type PacketType
- type RawPacket
- func (p *RawPacket) MarshalBinary() ([]byte, error)
- func (p *RawPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)
- func (p *RawPacket) ReadPacket(r io.Reader, b []byte, maxPacketLength uint32) error
- func (p *RawPacket) Reset()
- func (p *RawPacket) Type() PacketType
- func (p *RawPacket) UnmarshalBinary(data []byte) error
- func (p *RawPacket) UnmarshalFrom(buf *Buffer) error
- type ReadDirPacket
- type ReadLinkPacket
- type ReadPacket
- type RealPathPacket
- type RemovePacket
- type RenamePacket
- type RequestPacket
- func (p *RequestPacket) MarshalBinary() ([]byte, error)
- func (p *RequestPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)
- func (p *RequestPacket) ReadPacket(r io.Reader, b []byte, maxPacketLength uint32) error
- func (p *RequestPacket) Reset()
- func (p *RequestPacket) Type() PacketType
- func (p *RequestPacket) UnmarshalBinary(data []byte) error
- func (p *RequestPacket) UnmarshalFrom(buf *Buffer) error
- type RmdirPacket
- type SetstatPacket
- type StatPacket
- type Status
- type StatusPacket
- type SymlinkPacket
- type VersionPacket
- type WritePacket
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 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 NewMarshalBuffer ¶
func (*Buffer) AppendBool ¶
func (*Buffer) AppendByteSlice ¶
func (*Buffer) AppendCount ¶
func (*Buffer) AppendInt64 ¶
func (*Buffer) AppendString ¶
func (*Buffer) AppendUint8 ¶
func (*Buffer) AppendUint16 ¶
func (*Buffer) AppendUint32 ¶
func (*Buffer) AppendUint64 ¶
func (*Buffer) ConsumeBool ¶
func (*Buffer) ConsumeByteSlice ¶
func (*Buffer) ConsumeByteSliceCopy ¶
func (*Buffer) ConsumeCount ¶
func (*Buffer) ConsumeInt64 ¶
func (*Buffer) ConsumeString ¶
func (*Buffer) ConsumeUint8 ¶
func (*Buffer) ConsumeUint16 ¶
func (*Buffer) ConsumeUint32 ¶
func (*Buffer) ConsumeUint64 ¶
func (*Buffer) MarshalBinary ¶
func (*Buffer) StartPacket ¶
func (b *Buffer) StartPacket(packetType PacketType, requestID uint32)
func (*Buffer) UnmarshalBinary ¶
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 ¶
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 ¶
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 )
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) MarshalBinary ¶
func (*NameEntry) MarshalInto ¶
func (*NameEntry) UnmarshalBinary ¶
func (*NameEntry) UnmarshalFrom ¶
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 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 (*RawPacket) MarshalPacket ¶
func (*RawPacket) ReadPacket ¶ added in v0.0.5
func (*RawPacket) Type ¶
func (p *RawPacket) Type() PacketType
func (*RawPacket) UnmarshalBinary ¶
func (*RawPacket) UnmarshalFrom ¶
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 ¶
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 ¶
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 ¶
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 (*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 StatusPacket ¶
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 ¶
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 ¶
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)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.