personal-website/webfilesystem/webfilesystem.go
2023-04-13 04:09:07 +03:00

54 lines
949 B
Go

package webfilesystem
import "github.com/google/uuid"
type WebFileSystem struct {
folders []*Folder
}
func (fs *WebFileSystem) List() []*WebFSFile {
// aboutMe := &Exec{
// WebFSFile: WebFSFile{
// Id: uuid.NewString(),
// FileName: "Aboutme.app",
// },
// }
// testImg :=
// mockFolder := Folder{
// files: []File{aboutMe},
// }
// kek := []*WebFSFile{}
return []*WebFSFile{{uuid.NewString(), "Aboutme", "app", "personal-properties"}, {uuid.NewString(), "lel.lol", "lol", nil}, {uuid.NewString(), "lel.img", "img", nil}}
// return mockFolder.files
}
type Folder struct {
files []File
}
type WebFSFile struct {
Id string
FileName string
Type string
data interface{}
}
type File interface {
GetUuid() string
GetFileName() string
}
type Image struct {
}
type Exec struct {
WebFSFile
}
func (e *Exec) GetUuid() string {
return e.Id
}
func (e *Exec) GetFileName() string {
return e.FileName
}