vfs

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeType

type NodeType int
const (
	NodeDir NodeType = iota
	NodeFile
)

type Operations

type Operations struct {
	// contains filtered or unexported fields
}

func NewOperations

func NewOperations(cfg OperationsConfig) *Operations

func (*Operations) Create added in v0.0.5

func (o *Operations) Create(ctx context.Context, path string) (*VNode, error)

func (*Operations) Read

func (o *Operations) Read(ctx context.Context, path string) ([]byte, error)

func (*Operations) ReadDir

func (o *Operations) ReadDir(ctx context.Context, path string) ([]*VNode, error)

func (*Operations) Tree

func (o *Operations) Tree() *Tree

func (*Operations) Write

func (o *Operations) Write(ctx context.Context, path string, data []byte) error

type OperationsConfig

type OperationsConfig struct {
	Tree     *Tree
	Drive    *adapter.DriveAdapter
	Wiki     *adapter.WikiAdapter
	Calendar *adapter.CalendarAdapter
	Task     *adapter.TaskAdapter
	IM       *adapter.IMAdapter
	Mail     *adapter.MailAdapter
	Meeting  *adapter.MeetingAdapter
	ReadOnly bool
	TTL      time.Duration
}

type Tree

type Tree struct {
	// contains filtered or unexported fields
}

func NewTree

func NewTree(domains []string) *Tree

func (*Tree) DomainNode

func (t *Tree) DomainNode(domain string) *VNode

func (*Tree) Resolve

func (t *Tree) Resolve(path string) *VNode

func (*Tree) Root

func (t *Tree) Root() *VNode

type VNode

type VNode struct {
	Name     string
	Token    string
	DocType  doctype.DocType
	NodeType NodeType
	Domain   string
	Size     int64
	ModTime  time.Time
	// contains filtered or unexported fields
}

func NewRootNode

func NewRootNode() *VNode

func (*VNode) AddChild

func (n *VNode) AddChild(child *VNode)

func (*VNode) Children

func (n *VNode) Children() []*VNode

func (*VNode) ClearChildren

func (n *VNode) ClearChildren()

func (*VNode) GetChild

func (n *VNode) GetChild(name string) *VNode

func (*VNode) IsDir

func (n *VNode) IsDir() bool

func (*VNode) NeedsRefresh

func (n *VNode) NeedsRefresh(ttl time.Duration) bool

func (*VNode) Parent

func (n *VNode) Parent() *VNode

func (*VNode) Path

func (n *VNode) Path() string

func (*VNode) SetPopulated

func (n *VNode) SetPopulated()

Jump to

Keyboard shortcuts

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