Documentation
¶
Index ¶
- Variables
- type ControlKind
- type NodeKind
- type NodeType
- type Operations
- func (o *Operations) Create(ctx context.Context, path string) (*VNode, error)
- func (o *Operations) ExecuteOp(ctx context.Context, path string, payload []byte) ([]byte, error)
- func (o *Operations) ListView(ctx context.Context, path string) ([]*VNode, error)
- func (o *Operations) Mkdir(ctx context.Context, path string) (*VNode, error)
- func (o *Operations) Read(ctx context.Context, path string) ([]byte, error)
- func (o *Operations) ReadDir(ctx context.Context, path string) ([]*VNode, error)
- func (o *Operations) Remove(ctx context.Context, path string) error
- func (o *Operations) Rename(ctx context.Context, oldPath, newPath string) error
- func (o *Operations) RunQuery(ctx context.Context, path string, payload []byte) ([]byte, error)
- func (o *Operations) Stat(ctx context.Context, path string) (*VNode, error)
- func (o *Operations) Tree() *Tree
- func (o *Operations) Write(ctx context.Context, path string, data []byte) error
- type OperationsConfig
- type Tree
- type VNode
- func (n *VNode) AddChild(child *VNode)
- func (n *VNode) Children() []*VNode
- func (n *VNode) ClearChildren()
- func (n *VNode) GetChild(name string) *VNode
- func (n *VNode) GetModTime() time.Time
- func (n *VNode) GetSize() int64
- func (n *VNode) IsDir() bool
- func (n *VNode) NeedsRefresh(ttl time.Duration) bool
- func (n *VNode) Parent() *VNode
- func (n *VNode) Path() string
- func (n *VNode) SetModTime(t time.Time)
- func (n *VNode) SetPopulated()
- func (n *VNode) SetSize(s int64)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ControlKind ¶ added in v0.0.7
type ControlKind string
const ( ControlNone ControlKind = "" ControlMetaDir ControlKind = "meta_dir" ControlOpsDir ControlKind = "ops_dir" ControlQueriesDir ControlKind = "queries_dir" ControlViewsDir ControlKind = "views_dir" ControlIndexFile ControlKind = "index_file" ControlCapsFile ControlKind = "capabilities_file" ControlRequestFile ControlKind = "request_file" ControlResultFile ControlKind = "result_file" ControlViewDir ControlKind = "view_dir" ControlViewFile ControlKind = "view_file" )
type Operations ¶
type Operations struct {
// contains filtered or unexported fields
}
func NewOperations ¶
func NewOperations(cfg OperationsConfig) *Operations
func (*Operations) Remove ¶ added in v0.0.7
func (o *Operations) Remove(ctx context.Context, path string) error
func (*Operations) Rename ¶ added in v0.0.7
func (o *Operations) Rename(ctx context.Context, oldPath, newPath string) error
func (*Operations) Tree ¶
func (o *Operations) Tree() *Tree
type OperationsConfig ¶
type OperationsConfig struct {
CLI clipkg.Runner
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
CacheDir string
}
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
func (*Tree) DomainNode ¶
type VNode ¶
type VNode struct {
Name string
Token string
DocType doctype.DocType
PendingCreate bool
NodeType NodeType
Kind NodeKind
Control ControlKind
Domain string
CreatedTime time.Time
Page doctype.PageInfo
TargetPath string
Action string
// contains filtered or unexported fields
}
func NewRootNode ¶
func NewRootNode() *VNode
func (*VNode) ClearChildren ¶
func (n *VNode) ClearChildren()
func (*VNode) GetModTime ¶ added in v0.0.7
func (*VNode) SetModTime ¶ added in v0.0.7
func (*VNode) SetPopulated ¶
func (n *VNode) SetPopulated()
Source Files
¶
Click to show internal directories.
Click to hide internal directories.