Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NullID represents the nil value of object identifiers NullID = ID("-1") // RootID is the object identifier of the root of the filesystem RootID = ID("/") )
Variables ¶
View Source
var ErrInvalidObjectID = errors.New("invalid ID")
ErrInvalidObjectID is returned by ParseObjectID for invalid input
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Root of the filesystem, a.k.a. directory to serve Root string `json:"path"` }
Config holds the configuration parameters
type FileItem ¶
type FileItem struct { FilePath string ModTime time.Time // contains filtered or unexported fields }
func ItemFromPath ¶
type Filesystem ¶
type Filesystem struct {
// contains filtered or unexported fields
}
Filesystem is the main entry point
func New ¶
func New(conf Config) (fs *Filesystem, err error)
New creates a new Filesystem based on the passed configuration
func (*Filesystem) LastModTime ¶
func (fs *Filesystem) LastModTime() time.Time
type ID ¶
type ID string
ID is an "opaque" identifier for filesystem objects
func ParseObjectID ¶
ParseObjectID parses an ID out of a string
Click to show internal directories.
Click to hide internal directories.