alist/internal/model/object.go

32 lines
407 B
Go
Raw Normal View History

2022-06-15 10:06:42 +00:00
package model
2022-06-06 13:48:53 +00:00
2022-06-15 12:41:17 +00:00
import "time"
2022-06-06 13:48:53 +00:00
2022-06-15 12:41:17 +00:00
type Object struct {
ID string
Name string
Size uint64
Modified time.Time
IsFolder bool
2022-06-06 13:48:53 +00:00
}
2022-06-15 12:41:17 +00:00
func (f Object) GetName() string {
return f.Name
2022-06-06 13:48:53 +00:00
}
2022-06-07 14:02:41 +00:00
2022-06-15 12:41:17 +00:00
func (f Object) GetSize() uint64 {
return f.Size
2022-06-07 14:02:41 +00:00
}
2022-06-15 12:41:17 +00:00
func (f Object) ModTime() time.Time {
return f.Modified
}
func (f Object) IsDir() bool {
return f.IsFolder
}
func (f Object) GetID() string {
return f.ID
2022-06-07 14:02:41 +00:00
}