Documentation
¶
Overview ¶
Package memory implements an in-process vfs.Storage with case-insensitive substring search.
Suitable for single-process production use and tests; data is lost on process exit.
Index ¶
- type Storage
- func (s *Storage) DeleteFile(ctx context.Context, path string) error
- func (s *Storage) ListFiles(ctx context.Context) ([]vfs.FileMeta, error)
- func (s *Storage) ReadFile(ctx context.Context, path string) ([]byte, vfs.FileMeta, error)
- func (s *Storage) Search(ctx context.Context, query string) ([]string, error)
- func (s *Storage) SearchSyntax() string
- func (s *Storage) WriteFile(ctx context.Context, path string, content []byte, contentType string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is the in-memory implementation.
func (*Storage) Search ¶
Search performs a case-insensitive substring search against file contents.
Empty query matches every file in the corpus. Returns paths sorted.
func (*Storage) SearchSyntax ¶
SearchSyntax describes the query language this backend accepts.
Click to show internal directories.
Click to hide internal directories.