fs

package
v0.0.0-...-9bcf337 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment interface {
	Key() string
	Message() string
	Creation() time.Time
	LastMod() time.Time
}

type CommentText

type CommentText struct {
	Node
	FileInfo
	// contains filtered or unexported fields
}

func NewCommentText

func NewCommentText(c Comment) *CommentText

func (*CommentText) GetAttr

func (t *CommentText) GetAttr(out *fuse.Attr, file nodefs.File, ctx *fuse.Context) fuse.Status

func (*CommentText) Open

func (t *CommentText) Open(flags uint32, ctx *fuse.Context) (nodefs.File, fuse.Status)

func (*CommentText) OpenDir

func (t *CommentText) OpenDir(ctx *fuse.Context) ([]fuse.DirEntry, fuse.Status)

func (*CommentText) ReadDir

func (t *CommentText) ReadDir() ([]Dir, error)

func (*CommentText) ReadFile

func (t *CommentText) ReadFile() ([]byte, error)

func (*CommentText) Stat

func (t *CommentText) Stat() *FileInfo

type Ctl

type Ctl struct {
	Node
	FileInfo
	Commands map[string]func(args ...string) error
}

func (*Ctl) GetAttr

func (ctl *Ctl) GetAttr(out *fuse.Attr, file nodefs.File, ctx *fuse.Context) fuse.Status

func (*Ctl) Open

func (ctl *Ctl) Open(flags uint32, ctx *fuse.Context) (nodefs.File, fuse.Status)

func (*Ctl) OpenDir

func (ctl *Ctl) OpenDir(ctx *fuse.Context) ([]fuse.DirEntry, fuse.Status)

func (*Ctl) ReadDir

func (ctl *Ctl) ReadDir() ([]Dir, error)

func (*Ctl) ReadFile

func (ctl *Ctl) ReadFile() ([]byte, error)

func (*Ctl) Stat

func (ctl *Ctl) Stat() *FileInfo

func (*Ctl) Truncate

func (ctl *Ctl) Truncate(file nodefs.File, size uint64, ctx *fuse.Context) fuse.Status

func (*Ctl) Write

func (ctl *Ctl) Write(file nodefs.File, data []byte, off int64, ctx *fuse.Context) (uint32, fuse.Status)

func (*Ctl) WriteFile

func (ctl *Ctl) WriteFile(p []byte) error

type Dir

type Dir interface {
	Node
	Stat() *FileInfo
	ReadDir() ([]Dir, error)
	ReadFile() ([]byte, error)
}

type FileInfo

type FileInfo struct {
	Name     string
	Size     int64
	Mode     os.FileMode
	Creation time.Time
	LastMod  time.Time
}

func (*FileInfo) FillAttr

func (f *FileInfo) FillAttr(out *fuse.Attr)

func (*FileInfo) FillDirEntry

func (f *FileInfo) FillDirEntry(out *fuse.DirEntry)

func (*FileInfo) IsDir

func (f *FileInfo) IsDir() bool

type Node

type Node interface {
	nodefs.Node
}

func NewNode

func NewNode() Node

type Root

type Root struct {
	Node
	FileInfo
	// contains filtered or unexported fields
}

func NewRoot

func NewRoot() *Root

func (*Root) GetAttr

func (root *Root) GetAttr(out *fuse.Attr, file nodefs.File, ctx *fuse.Context) fuse.Status

func (*Root) Lookup

func (root *Root) Lookup(out *fuse.Attr, name string, ctx *fuse.Context) (*nodefs.Inode, fuse.Status)

func (*Root) MountAndServe

func (root *Root) MountAndServe(mtpt string, debug bool) error

func (*Root) OpenDir

func (root *Root) OpenDir(ctx *fuse.Context) ([]fuse.DirEntry, fuse.Status)

func (*Root) ReadDir

func (root *Root) ReadDir() ([]Dir, error)

func (*Root) ReadFile

func (*Root) ReadFile() ([]byte, error)

func (*Root) RegisterService

func (root *Root) RegisterService(kind string, fn func(token, url string) (Service, error))

func (*Root) Stat

func (root *Root) Stat() *FileInfo

type Service

type Service interface {
	Name() string
	List() ([]Task, error)
}

type ServiceDir

type ServiceDir struct {
	Node
	FileInfo
	// contains filtered or unexported fields
}

func (*ServiceDir) GetAttr

func (dir *ServiceDir) GetAttr(out *fuse.Attr, file nodefs.File, ctx *fuse.Context) fuse.Status

func (*ServiceDir) Lookup

func (dir *ServiceDir) Lookup(out *fuse.Attr, name string, ctx *fuse.Context) (*nodefs.Inode, fuse.Status)

func (*ServiceDir) OpenDir

func (dir *ServiceDir) OpenDir(ctx *fuse.Context) ([]fuse.DirEntry, fuse.Status)

func (*ServiceDir) ReadDir

func (dir *ServiceDir) ReadDir() ([]Dir, error)

func (*ServiceDir) ReadFile

func (*ServiceDir) ReadFile() ([]byte, error)

func (*ServiceDir) Stat

func (dir *ServiceDir) Stat() *FileInfo

type Task

type Task interface {
	Key() string
	Subject() string
	Message() string
	PermaLink() string
	Creation() time.Time
	LastMod() time.Time
	Comments() ([]Comment, error)
}

type TaskDir

type TaskDir struct {
	Node
	FileInfo
	// contains filtered or unexported fields
}

func (*TaskDir) GetAttr

func (dir *TaskDir) GetAttr(out *fuse.Attr, file nodefs.File, ctx *fuse.Context) fuse.Status

func (*TaskDir) Lookup

func (dir *TaskDir) Lookup(out *fuse.Attr, name string, ctx *fuse.Context) (*nodefs.Inode, fuse.Status)

func (*TaskDir) OpenDir

func (dir *TaskDir) OpenDir(ctx *fuse.Context) ([]fuse.DirEntry, fuse.Status)

func (*TaskDir) ReadDir

func (dir *TaskDir) ReadDir() ([]Dir, error)

func (*TaskDir) ReadFile

func (*TaskDir) ReadFile() ([]byte, error)

func (*TaskDir) Stat

func (dir *TaskDir) Stat() *FileInfo

type Text

type Text struct {
	Node
	FileInfo
	// contains filtered or unexported fields
}

func (*Text) GetAttr

func (t *Text) GetAttr(out *fuse.Attr, file nodefs.File, ctx *fuse.Context) fuse.Status

func (*Text) Open

func (t *Text) Open(flags uint32, ctx *fuse.Context) (nodefs.File, fuse.Status)

func (*Text) OpenDir

func (t *Text) OpenDir(ctx *fuse.Context) ([]fuse.DirEntry, fuse.Status)

func (*Text) ReadDir

func (t *Text) ReadDir() ([]Dir, error)

func (*Text) ReadFile

func (t *Text) ReadFile() ([]byte, error)

func (*Text) Stat

func (t *Text) Stat() *FileInfo

Jump to

Keyboard shortcuts

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