rename projects folder to groups
This commit is contained in:
parent
50ff5208fb
commit
76bba479b5
|
@ -8,7 +8,7 @@ import (
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
)
|
)
|
||||||
|
|
||||||
type projectsNode struct {
|
type groupsNode struct {
|
||||||
fs.Inode
|
fs.Inode
|
||||||
param *FSParam
|
param *FSParam
|
||||||
|
|
||||||
|
@ -16,16 +16,16 @@ type projectsNode struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure we are implementing the NodeOnAdder interface
|
// Ensure we are implementing the NodeOnAdder interface
|
||||||
var _ = (fs.NodeOnAdder)((*projectsNode)(nil))
|
var _ = (fs.NodeOnAdder)((*groupsNode)(nil))
|
||||||
|
|
||||||
func newProjectsNode(rootGroupIds []int, param *FSParam) *projectsNode {
|
func newGroupsNode(rootGroupIds []int, param *FSParam) *groupsNode {
|
||||||
return &projectsNode{
|
return &groupsNode{
|
||||||
param: param,
|
param: param,
|
||||||
rootGroupIds: rootGroupIds,
|
rootGroupIds: rootGroupIds,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *projectsNode) OnAdd(ctx context.Context) {
|
func (n *groupsNode) OnAdd(ctx context.Context) {
|
||||||
for _, groupID := range n.rootGroupIds {
|
for _, groupID := range n.rootGroupIds {
|
||||||
groupNode, err := newGroupNodeByID(groupID, n.param)
|
groupNode, err := newGroupNodeByID(groupID, n.param)
|
||||||
if err != nil {
|
if err != nil {
|
|
@ -38,9 +38,9 @@ type rootNode struct {
|
||||||
var _ = (fs.NodeOnAdder)((*rootNode)(nil))
|
var _ = (fs.NodeOnAdder)((*rootNode)(nil))
|
||||||
|
|
||||||
func (n *rootNode) OnAdd(ctx context.Context) {
|
func (n *rootNode) OnAdd(ctx context.Context) {
|
||||||
projectsInode := n.NewPersistentInode(
|
groupsInode := n.NewPersistentInode(
|
||||||
ctx,
|
ctx,
|
||||||
newProjectsNode(
|
newGroupsNode(
|
||||||
n.rootGroupIds,
|
n.rootGroupIds,
|
||||||
n.param,
|
n.param,
|
||||||
),
|
),
|
||||||
|
@ -49,7 +49,7 @@ func (n *rootNode) OnAdd(ctx context.Context) {
|
||||||
Mode: fuse.S_IFDIR,
|
Mode: fuse.S_IFDIR,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
n.AddChild("projects", projectsInode, false)
|
n.AddChild("groups", groupsInode, false)
|
||||||
|
|
||||||
usersInode := n.NewPersistentInode(
|
usersInode := n.NewPersistentInode(
|
||||||
ctx,
|
ctx,
|
||||||
|
|
Loading…
Reference in New Issue