27 lines
606 B
Go
27 lines
606 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"git.gm6.ru/icewind/pfs/models"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type IFSStat struct {
|
|
ID uuid.UUID
|
|
Name string
|
|
IsDir bool
|
|
Created time.Time
|
|
LastModified time.Time
|
|
OwnerID uuid.UUID
|
|
}
|
|
|
|
type IFS interface {
|
|
DirCreate(dir *models.Dir, userID uuid.UUID) error
|
|
DirRemove(dirID uuid.UUID, userID uuid.UUID) error
|
|
DirRead(dirID uuid.UUID, userID uuid.UUID) ([]IFSStat, error)
|
|
FileCreate(file *models.File) error
|
|
FileRemove(fileID uuid.UUID, userID uuid.UUID) error
|
|
FileRead(fileID uuid.UUID, userID uuid.UUID) (*models.File, error)
|
|
}
|