Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFileAlreadyExists = errors.New("file already exists") ErrFileNotFound = errors.New("file not found") )
Functions ¶
This section is empty.
Types ¶
type FileNode ¶
type FileNode interface { // GetByPath reads the file node at the given path. // It may return ErrFileNotFound. GetByPath(ctx context.Context, path string) (model.FileNode, error) // GetById reads the file node with the given ID. // It may return ErrFileNotFound. GetById(ctx context.Context, id model.ID) (model.FileNode, error) // Create creates the given file. // It may return ErrFileAlreadyExists. Create(ctx context.Context, newFileNode model.CreateFileNode) (model.FileNode, error) // DeleteById deletes the node with the given ID. // It may return ErrFileNotFound. DeleteById(ctx context.Context, id model.ID) error // SetState changes the state of the node with the given ID. // It may return ErrFileNotFound. SetState(ctx context.Context, id model.ID, newState model.NodeState) error }
Click to show internal directories.
Click to hide internal directories.