Versions in this module Expand all Collapse all v1 v1.0.0 Dec 31, 2019 v0 v0.1.0 Jul 12, 2018 Changes in this version + const None + const Oexec + const Ordwr + const Oread + const Otrunc + const Owrite + const Rattach + const Rauth + const Rclunk + const Rcreate + const Rerror + const Rflush + const Ropen + const Rread + const Rremove + const Rstat + const Rversion + const Rwalk + const Rwrite + const Rwstat + const Tattach + const Tauth + const Tclunk + const Tcreate + const Terror + const Tflush + const Topen + const Tread + const Tremove + const Tstat + const Tversion + const Twalk + const Twrite + const Twstat + func SliceForRead(ctx *ReadContext, file []byte) []byte + type AuthContext struct + func (ctx *AuthContext) SetAuthenticated(b bool) + type Client struct + func (cli *Client) Connect(rw io.ReadWriter) error + func (cli *Client) Create(path string, fmode uint32, omode Mode) (*File9P, error) + func (cli *Client) ListDir(path string) ([]Stat, error) + func (cli *Client) Open(path string, omode Mode) (*File9P, error) + func (cli *Client) Stat(path string) (*Stat, error) + type CreateContext struct + Mode uint8 + Name string + NewPath string + Perm uint32 + func (ctx *CreateContext) Respond(length uint64) *File + type Ctx struct + Fid uint32 + File *File + func (ctx *Ctx) Fail(s string) + func (ctx *Ctx) FileByPath(path string) *File + func (ctx *Ctx) UniqueFileID() string + func (ctx *Ctx) UpdateFS(fn func(*UpdateContext)) + func (ctx *Ctx) Username() string + type DirReadContext struct + func (ctx *DirReadContext) Respond() + type FCall struct + Ctype uint8 + Tag uint16 + func (fc *FCall) GetFCall() *FCall + func (fc *FCall) Reply(fs *filesystem, conn *connection, s *Server) IFCall + func (fc *FCall) String() string + type File struct + Parent *File + Path string + Stat Stat + func (f *File) IsDirectory() bool + func (f *File) ListSubfiles() []*File + type File9P struct + func (f *File9P) Close() error + func (f *File9P) Read(p []byte) (n int, err error) + func (f *File9P) Seek(offset uint64) + func (f *File9P) SingleRead(p []byte) (n int, err error) + func (f *File9P) SingleWrite(p []byte) (n int, err error) + func (f *File9P) Write(p []byte) (n int, err error) + type IFCall interface + Compose func() []byte + GetFCall func() *FCall + Parse func([]byte) ([]byte, error) + Reply func(*filesystem, *connection, *Server) IFCall + String func() string + func ParseCall(r io.Reader) (IFCall, error) + type Mode uint8 + type OpenContext struct + Mode uint8 + func (ctx *OpenContext) Respond() + type ParseError struct + Err string + func (pe *ParseError) Error() string + type Qid struct + Qtype uint8 + Uid uint64 + Vers uint32 + func (qid *Qid) Compose() []byte + func (qid *Qid) Parse(buff []byte) ([]byte, error) + func (qid *Qid) String() string + type RAttach struct + Qid Qid + func (attach *RAttach) Compose() []byte + func (attach *RAttach) Parse(buff []byte) ([]byte, error) + func (attach *RAttach) String() string + type RAuth struct + Aqid Qid + func (auth *RAuth) Compose() []byte + func (auth *RAuth) Parse(buff []byte) ([]byte, error) + func (auth *RAuth) String() string + type RClunk struct + func (clunk *RClunk) Compose() []byte + func (clunk *RClunk) Parse(buff []byte) ([]byte, error) + func (clunk *RClunk) String() string + type RCreate struct + Iounit uint32 + Qid Qid + func (create *RCreate) Compose() []byte + func (create *RCreate) Parse(buff []byte) ([]byte, error) + func (create *RCreate) String() string + type RError struct + Ename string + func (error *RError) Compose() []byte + func (error *RError) Parse(buff []byte) ([]byte, error) + func (error *RError) String() string + type RFlush struct + func (flush *RFlush) Compose() []byte + func (flush *RFlush) Parse(buff []byte) ([]byte, error) + func (flush *RFlush) String() string + type ROpen struct + Iounit uint32 + Qid Qid + func (open *ROpen) Compose() []byte + func (open *ROpen) Parse(buff []byte) ([]byte, error) + func (open *ROpen) String() string + type RRead struct + Count uint32 + Data []byte + func (read *RRead) Compose() []byte + func (read *RRead) Parse(buff []byte) ([]byte, error) + func (read *RRead) String() string + type RRemove struct + func (remove *RRemove) Compose() []byte + func (remove *RRemove) Parse(buff []byte) ([]byte, error) + func (remove *RRemove) String() string + type RStat struct + func (stat *RStat) Compose() []byte + func (stat *RStat) Parse(buff []byte) ([]byte, error) + func (stat *RStat) String() string + type RWalk struct + Nwqid uint16 + Wqid []Qid + func (walk *RWalk) Compose() []byte + func (walk *RWalk) Parse(buff []byte) ([]byte, error) + func (walk *RWalk) String() string + type RWrite struct + Count uint32 + func (write *RWrite) Compose() []byte + func (write *RWrite) Parse(buff []byte) ([]byte, error) + func (write *RWrite) String() string + type RWstat struct + func (wstat *RWstat) Compose() []byte + func (wstat *RWstat) Parse(buff []byte) ([]byte, error) + func (wstat *RWstat) String() string + type ReadContext struct + Count uint32 + Offset uint64 + func (ctx *ReadContext) Respond(data []byte) + type RemoveContext struct + func (ctx *RemoveContext) Respond() + type Server struct + Auth func(ctx *AuthContext, in <-chan []byte, out chan<- []byte) + Close func(ctx *Ctx) + Create func(ctx *CreateContext) + DirRead func(ctx *DirReadContext) + Open func(ctx *OpenContext) + Read func(ctx *ReadContext) + Remove func(ctx *RemoveContext) + Setup func(ctx *UpdateContext) + Write func(ctx *WriteContext) + func (srv *Server) Serve(listener net.Listener) + type Stat struct + Atime uint32 + Dev uint32 + Gid string + Length uint64 + Mode uint32 + Mtime uint32 + Muid string + Name string + Qid Qid + Stype uint16 + Uid string + func (stat *Stat) Compose() []byte + func (stat *Stat) ComposeLength() uint16 + func (stat *Stat) Parse(buff []byte) ([]byte, error) + func (stat *Stat) String() string + type TAttach struct + Afid uint32 + Aname string + Fid uint32 + Uname string + func (attach *TAttach) Compose() []byte + func (attach *TAttach) Parse(buff []byte) ([]byte, error) + func (attach *TAttach) Reply(fs *filesystem, conn *connection, s *Server) IFCall + func (attach *TAttach) String() string + type TAuth struct + Afid uint32 + Aname string + Uname string + func (auth *TAuth) Compose() []byte + func (auth *TAuth) Parse(buff []byte) ([]byte, error) + func (auth *TAuth) Reply(fs *filesystem, conn *connection, s *Server) IFCall + func (auth *TAuth) String() string + type TClunk struct + Fid uint32 + func (clunk *TClunk) Compose() []byte + func (clunk *TClunk) Parse(buff []byte) ([]byte, error) + func (clunk *TClunk) Reply(fs *filesystem, conn *connection, s *Server) IFCall + func (clunk *TClunk) String() string + type TCreate struct + Fid uint32 + Mode uint8 + Name string + Perm uint32 + func (create *TCreate) Compose() []byte + func (create *TCreate) Parse(buff []byte) ([]byte, error) + func (create *TCreate) Reply(fs *filesystem, conn *connection, s *Server) IFCall + func (create *TCreate) String() string + type TFlush struct + Oldtag uint16 + func (flush *TFlush) Compose() []byte + func (flush *TFlush) Parse(buff []byte) ([]byte, error) + func (flush *TFlush) String() string + type TOpen struct + Fid uint32 + func (open *TOpen) Compose() []byte + func (open *TOpen) Parse(buff []byte) ([]byte, error) + func (open *TOpen) Reply(fs *filesystem, conn *connection, s *Server) IFCall + func (open *TOpen) String() string + type TRVersion struct + Msize uint32 + Version string + func (version *TRVersion) Compose() []byte + func (version *TRVersion) Parse(buff []byte) ([]byte, error) + func (version *TRVersion) Reply(fs *filesystem, conn *connection, s *Server) IFCall + func (version *TRVersion) String() string + type TRead struct + Count uint32 + Fid uint32 + Offset uint64 + func (read *TRead) Compose() []byte + func (read *TRead) Parse(buff []byte) ([]byte, error) + func (read *TRead) Reply(fs *filesystem, conn *connection, s *Server) IFCall + func (read *TRead) String() string + type TRemove struct + Fid uint32 + func (remove *TRemove) Compose() []byte + func (remove *TRemove) Parse(buff []byte) ([]byte, error) + func (remove *TRemove) Reply(fs *filesystem, conn *connection, s *Server) IFCall + func (remove *TRemove) String() string + type TStat struct + Fid uint32 + func (stat *TStat) Compose() []byte + func (stat *TStat) Parse(buff []byte) ([]byte, error) + func (stat *TStat) Reply(fs *filesystem, conn *connection, s *Server) IFCall + func (stat *TStat) String() string + type TWalk struct + Fid uint32 + Newfid uint32 + Nwname uint16 + Wname []string + func (walk *TWalk) Compose() []byte + func (walk *TWalk) Parse(buff []byte) ([]byte, error) + func (walk *TWalk) Reply(fs *filesystem, conn *connection, s *Server) IFCall + func (walk *TWalk) String() string + type TWrite struct + Count uint32 + Data []byte + Fid uint32 + Offset uint64 + func (write *TWrite) Compose() []byte + func (write *TWrite) Parse(buff []byte) ([]byte, error) + func (write *TWrite) Reply(fs *filesystem, conn *connection, s *Server) IFCall + func (write *TWrite) String() string + type TWstat struct + Fid uint32 + Stat Stat + func (wstat *TWstat) Compose() []byte + func (wstat *TWstat) Parse(buff []byte) ([]byte, error) + func (wstat *TWstat) Reply(fs *filesystem, conn *connection, s *Server) IFCall + func (wstat *TWstat) String() string + type UpdateContext struct + func (ctx *UpdateContext) AddFile(mode uint32, length uint64, name string, owner string, parent *File) *File + func (ctx *UpdateContext) RemoveFile(f *File) + type WriteContext struct + Count uint32 + Data []byte + Offset uint64 + func (ctx *WriteContext) Respond(count uint32)