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"
|
||||
)
|
||||
|
||||
type projectsNode struct {
|
||||
type groupsNode struct {
|
||||
fs.Inode
|
||||
param *FSParam
|
||||
|
||||
|
@ -16,16 +16,16 @@ type projectsNode struct {
|
|||
}
|
||||
|
||||
// Ensure we are implementing the NodeOnAdder interface
|
||||
var _ = (fs.NodeOnAdder)((*projectsNode)(nil))
|
||||
var _ = (fs.NodeOnAdder)((*groupsNode)(nil))
|
||||
|
||||
func newProjectsNode(rootGroupIds []int, param *FSParam) *projectsNode {
|
||||
return &projectsNode{
|
||||
func newGroupsNode(rootGroupIds []int, param *FSParam) *groupsNode {
|
||||
return &groupsNode{
|
||||
param: param,
|
||||
rootGroupIds: rootGroupIds,
|
||||
}
|
||||
}
|
||||
|
||||
func (n *projectsNode) OnAdd(ctx context.Context) {
|
||||
func (n *groupsNode) OnAdd(ctx context.Context) {
|
||||
for _, groupID := range n.rootGroupIds {
|
||||
groupNode, err := newGroupNodeByID(groupID, n.param)
|
||||
if err != nil {
|
|
@ -38,9 +38,9 @@ type rootNode struct {
|
|||
var _ = (fs.NodeOnAdder)((*rootNode)(nil))
|
||||
|
||||
func (n *rootNode) OnAdd(ctx context.Context) {
|
||||
projectsInode := n.NewPersistentInode(
|
||||
groupsInode := n.NewPersistentInode(
|
||||
ctx,
|
||||
newProjectsNode(
|
||||
newGroupsNode(
|
||||
n.rootGroupIds,
|
||||
n.param,
|
||||
),
|
||||
|
@ -49,7 +49,7 @@ func (n *rootNode) OnAdd(ctx context.Context) {
|
|||
Mode: fuse.S_IFDIR,
|
||||
},
|
||||
)
|
||||
n.AddChild("projects", projectsInode, false)
|
||||
n.AddChild("groups", groupsInode, false)
|
||||
|
||||
usersInode := n.NewPersistentInode(
|
||||
ctx,
|
||||
|
|
Loading…
Reference in New Issue