rename projects folder to groups

This commit is contained in:
Massaki Archambault 2021-03-03 00:34:32 -05:00
parent 50ff5208fb
commit 76bba479b5
2 changed files with 8 additions and 8 deletions

View File

@ -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 {

View File

@ -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,