17 KiB
17 KiB
API Contract Scan
CODEX.md was not present under /workspace; conventions were taken from CLAUDE.md.
Coverage is yes when package tests either execute the exported function/method (go test -coverprofile) or reference the exported type name directly.
| Name | Signature | Package Path | Description | Test Coverage |
|---|---|---|---|---|
| FromTar | func FromTar(data []byte) (*Medium, error) |
dappco.re/go/core/io/datanode |
FromTar creates a Medium from a tarball, restoring all files. | yes |
| New | func New() *Medium |
dappco.re/go/core/io/datanode |
New creates a new empty DataNode Medium. | yes |
| Medium.Append | func (m *Medium) Append(p string) (goio.WriteCloser, error) |
dappco.re/go/core/io/datanode |
Opens a file for appending and returns a writer. | yes |
| Medium.Create | func (m *Medium) Create(p string) (goio.WriteCloser, error) |
dappco.re/go/core/io/datanode |
Creates or truncates a file and returns a writer. | yes |
| Medium.DataNode | func (m *Medium) DataNode() *borgdatanode.DataNode |
dappco.re/go/core/io/datanode |
DataNode returns the underlying Borg DataNode. | yes |
| Medium.Delete | func (m *Medium) Delete(p string) error |
dappco.re/go/core/io/datanode |
Deletes a file or empty directory. | yes |
| Medium.DeleteAll | func (m *Medium) DeleteAll(p string) error |
dappco.re/go/core/io/datanode |
Deletes a file or directory tree recursively. | yes |
| Medium.EnsureDir | func (m *Medium) EnsureDir(p string) error |
dappco.re/go/core/io/datanode |
Ensures a directory exists. | yes |
| Medium.Exists | func (m *Medium) Exists(p string) bool |
dappco.re/go/core/io/datanode |
Reports whether a path exists. | yes |
| Medium.FileGet | func (m *Medium) FileGet(p string) (string, error) |
dappco.re/go/core/io/datanode |
Alias for Read. | yes |
| Medium.FileSet | func (m *Medium) FileSet(p, content string) error |
dappco.re/go/core/io/datanode |
Alias for Write. | yes |
| Medium.IsDir | func (m *Medium) IsDir(p string) bool |
dappco.re/go/core/io/datanode |
Reports whether a path exists and is a directory. | yes |
| Medium.IsFile | func (m *Medium) IsFile(p string) bool |
dappco.re/go/core/io/datanode |
Reports whether a path exists and is a regular file. | yes |
| Medium.List | func (m *Medium) List(p string) ([]fs.DirEntry, error) |
dappco.re/go/core/io/datanode |
Lists directory entries under the path. | yes |
| Medium.Open | func (m *Medium) Open(p string) (fs.File, error) |
dappco.re/go/core/io/datanode |
Opens a file for reading. | yes |
| Medium.Read | func (m *Medium) Read(p string) (string, error) |
dappco.re/go/core/io/datanode |
Reads file contents as a string. | yes |
| Medium.ReadStream | func (m *Medium) ReadStream(p string) (goio.ReadCloser, error) |
dappco.re/go/core/io/datanode |
Opens a streaming reader for a file. | yes |
| Medium.Rename | func (m *Medium) Rename(oldPath, newPath string) error |
dappco.re/go/core/io/datanode |
Renames or moves a file or directory. | yes |
| Medium.Restore | func (m *Medium) Restore(data []byte) error |
dappco.re/go/core/io/datanode |
Restore replaces the filesystem contents from a tarball. | yes |
| Medium.Snapshot | func (m *Medium) Snapshot() ([]byte, error) |
dappco.re/go/core/io/datanode |
Snapshot serializes the entire filesystem to a tarball. | yes |
| Medium.Stat | func (m *Medium) Stat(p string) (fs.FileInfo, error) |
dappco.re/go/core/io/datanode |
Returns file metadata for the path. | yes |
| Medium.Write | func (m *Medium) Write(p, content string) error |
dappco.re/go/core/io/datanode |
Writes string content to a file. | yes |
| Medium.WriteMode | func (m *Medium) WriteMode(p, content string, mode os.FileMode) error |
dappco.re/go/core/io/datanode |
Writes content to a file with an explicit mode. | no |
| Medium.WriteStream | func (m *Medium) WriteStream(p string) (goio.WriteCloser, error) |
dappco.re/go/core/io/datanode |
Opens a streaming writer for a file. | yes |
| Medium | type Medium struct |
dappco.re/go/core/io/datanode |
Medium is an in-memory storage backend backed by a Borg DataNode. | yes |
| New | func New(root string) (*Medium, error) |
dappco.re/go/core/io/local |
New creates a new local Medium rooted at the given directory. | yes |
| Medium.Append | func (m *Medium) Append(p string) (goio.WriteCloser, error) |
dappco.re/go/core/io/local |
Append opens the named file for appending, creating it if it doesn't exist. | no |
| Medium.Create | func (m *Medium) Create(p string) (goio.WriteCloser, error) |
dappco.re/go/core/io/local |
Create creates or truncates the named file. | yes |
| Medium.Delete | func (m *Medium) Delete(p string) error |
dappco.re/go/core/io/local |
Delete removes a file or empty directory. | yes |
| Medium.DeleteAll | func (m *Medium) DeleteAll(p string) error |
dappco.re/go/core/io/local |
DeleteAll removes a file or directory recursively. | yes |
| Medium.EnsureDir | func (m *Medium) EnsureDir(p string) error |
dappco.re/go/core/io/local |
EnsureDir creates directory if it doesn't exist. | yes |
| Medium.Exists | func (m *Medium) Exists(p string) bool |
dappco.re/go/core/io/local |
Exists returns true if path exists. | yes |
| Medium.FileGet | func (m *Medium) FileGet(p string) (string, error) |
dappco.re/go/core/io/local |
FileGet is an alias for Read. | yes |
| Medium.FileSet | func (m *Medium) FileSet(p, content string) error |
dappco.re/go/core/io/local |
FileSet is an alias for Write. | yes |
| Medium.IsDir | func (m *Medium) IsDir(p string) bool |
dappco.re/go/core/io/local |
IsDir returns true if path is a directory. | yes |
| Medium.IsFile | func (m *Medium) IsFile(p string) bool |
dappco.re/go/core/io/local |
IsFile returns true if path is a regular file. | yes |
| Medium.List | func (m *Medium) List(p string) ([]fs.DirEntry, error) |
dappco.re/go/core/io/local |
List returns directory entries. | yes |
| Medium.Open | func (m *Medium) Open(p string) (fs.File, error) |
dappco.re/go/core/io/local |
Open opens the named file for reading. | yes |
| Medium.Read | func (m *Medium) Read(p string) (string, error) |
dappco.re/go/core/io/local |
Read returns file contents as string. | yes |
| Medium.ReadStream | func (m *Medium) ReadStream(path string) (goio.ReadCloser, error) |
dappco.re/go/core/io/local |
ReadStream returns a reader for the file content. | yes |
| Medium.Rename | func (m *Medium) Rename(oldPath, newPath string) error |
dappco.re/go/core/io/local |
Rename moves a file or directory. | yes |
| Medium.Stat | func (m *Medium) Stat(p string) (fs.FileInfo, error) |
dappco.re/go/core/io/local |
Stat returns file info. | yes |
| Medium.Write | func (m *Medium) Write(p, content string) error |
dappco.re/go/core/io/local |
Write saves content to file, creating parent directories as needed. | yes |
| Medium.WriteMode | func (m *Medium) WriteMode(p, content string, mode os.FileMode) error |
dappco.re/go/core/io/local |
WriteMode saves content to file with explicit permissions. | yes |
| Medium.WriteStream | func (m *Medium) WriteStream(path string) (goio.WriteCloser, error) |
dappco.re/go/core/io/local |
WriteStream returns a writer for the file content. | yes |
| Medium | type Medium struct |
dappco.re/go/core/io/local |
Medium is a local filesystem storage backend. | yes |
| New | func New(bucket string, opts ...Option) (*Medium, error) |
dappco.re/go/core/io/s3 |
New creates a new S3 Medium for the given bucket. | yes |
| WithClient | func WithClient(client *s3.Client) Option |
dappco.re/go/core/io/s3 |
WithClient sets the S3 client for dependency injection. | no |
| WithPrefix | func WithPrefix(prefix string) Option |
dappco.re/go/core/io/s3 |
WithPrefix sets an optional key prefix for all operations. | yes |
| Medium.Append | func (m *Medium) Append(p string) (goio.WriteCloser, error) |
dappco.re/go/core/io/s3 |
Append opens the named file for appending. | yes |
| Medium.Create | func (m *Medium) Create(p string) (goio.WriteCloser, error) |
dappco.re/go/core/io/s3 |
Create creates or truncates the named file. | yes |
| Medium.Delete | func (m *Medium) Delete(p string) error |
dappco.re/go/core/io/s3 |
Delete removes a single object. | yes |
| Medium.DeleteAll | func (m *Medium) DeleteAll(p string) error |
dappco.re/go/core/io/s3 |
DeleteAll removes all objects under the given prefix. | yes |
| Medium.EnsureDir | func (m *Medium) EnsureDir(_ string) error |
dappco.re/go/core/io/s3 |
EnsureDir is a no-op for S3 (S3 has no real directories). | yes |
| Medium.Exists | func (m *Medium) Exists(p string) bool |
dappco.re/go/core/io/s3 |
Exists checks if a path exists (file or directory prefix). | yes |
| Medium.FileGet | func (m *Medium) FileGet(p string) (string, error) |
dappco.re/go/core/io/s3 |
FileGet is a convenience function that reads a file from the medium. | yes |
| Medium.FileSet | func (m *Medium) FileSet(p, content string) error |
dappco.re/go/core/io/s3 |
FileSet is a convenience function that writes a file to the medium. | yes |
| Medium.IsDir | func (m *Medium) IsDir(p string) bool |
dappco.re/go/core/io/s3 |
IsDir checks if a path exists and is a directory (has objects under it as a prefix). | yes |
| Medium.IsFile | func (m *Medium) IsFile(p string) bool |
dappco.re/go/core/io/s3 |
IsFile checks if a path exists and is a regular file (not a "directory" prefix). | yes |
| Medium.List | func (m *Medium) List(p string) ([]fs.DirEntry, error) |
dappco.re/go/core/io/s3 |
List returns directory entries for the given path using ListObjectsV2 with delimiter. | yes |
| Medium.Open | func (m *Medium) Open(p string) (fs.File, error) |
dappco.re/go/core/io/s3 |
Open opens the named file for reading. | yes |
| Medium.Read | func (m *Medium) Read(p string) (string, error) |
dappco.re/go/core/io/s3 |
Read retrieves the content of a file as a string. | yes |
| Medium.ReadStream | func (m *Medium) ReadStream(p string) (goio.ReadCloser, error) |
dappco.re/go/core/io/s3 |
ReadStream returns a reader for the file content. | yes |
| Medium.Rename | func (m *Medium) Rename(oldPath, newPath string) error |
dappco.re/go/core/io/s3 |
Rename moves an object by copying then deleting the original. | yes |
| Medium.Stat | func (m *Medium) Stat(p string) (fs.FileInfo, error) |
dappco.re/go/core/io/s3 |
Stat returns file information for the given path using HeadObject. | yes |
| Medium.Write | func (m *Medium) Write(p, content string) error |
dappco.re/go/core/io/s3 |
Write saves the given content to a file, overwriting it if it exists. | yes |
| Medium.WriteStream | func (m *Medium) WriteStream(p string) (goio.WriteCloser, error) |
dappco.re/go/core/io/s3 |
WriteStream returns a writer for the file content. | yes |
| Medium | type Medium struct |
dappco.re/go/core/io/s3 |
Medium is an S3-backed storage backend implementing the io.Medium interface. | yes |
| Option | type Option func(*Medium) |
dappco.re/go/core/io/s3 |
Option configures a Medium. | no |
| New | func New(dbPath string, opts ...Option) (*Medium, error) |
dappco.re/go/core/io/sqlite |
New creates a new SQLite Medium at the given database path. | yes |
| WithTable | func WithTable(table string) Option |
dappco.re/go/core/io/sqlite |
WithTable sets the table name (default: "files"). | yes |
| Medium.Append | func (m *Medium) Append(p string) (goio.WriteCloser, error) |
dappco.re/go/core/io/sqlite |
Append opens the named file for appending, creating it if it doesn't exist. | yes |
| Medium.Close | func (m *Medium) Close() error |
dappco.re/go/core/io/sqlite |
Close closes the underlying database connection. | yes |
| Medium.Create | func (m *Medium) Create(p string) (goio.WriteCloser, error) |
dappco.re/go/core/io/sqlite |
Create creates or truncates the named file. | yes |
| Medium.Delete | func (m *Medium) Delete(p string) error |
dappco.re/go/core/io/sqlite |
Delete removes a file or empty directory. | yes |
| Medium.DeleteAll | func (m *Medium) DeleteAll(p string) error |
dappco.re/go/core/io/sqlite |
DeleteAll removes a file or directory and all its contents recursively. | yes |
| Medium.EnsureDir | func (m *Medium) EnsureDir(p string) error |
dappco.re/go/core/io/sqlite |
EnsureDir makes sure a directory exists, creating it if necessary. | yes |
| Medium.Exists | func (m *Medium) Exists(p string) bool |
dappco.re/go/core/io/sqlite |
Exists checks if a path exists (file or directory). | yes |
| Medium.FileGet | func (m *Medium) FileGet(p string) (string, error) |
dappco.re/go/core/io/sqlite |
FileGet is a convenience function that reads a file from the medium. | yes |
| Medium.FileSet | func (m *Medium) FileSet(p, content string) error |
dappco.re/go/core/io/sqlite |
FileSet is a convenience function that writes a file to the medium. | yes |
| Medium.IsDir | func (m *Medium) IsDir(p string) bool |
dappco.re/go/core/io/sqlite |
IsDir checks if a path exists and is a directory. | yes |
| Medium.IsFile | func (m *Medium) IsFile(p string) bool |
dappco.re/go/core/io/sqlite |
IsFile checks if a path exists and is a regular file. | yes |
| Medium.List | func (m *Medium) List(p string) ([]fs.DirEntry, error) |
dappco.re/go/core/io/sqlite |
List returns the directory entries for the given path. | yes |
| Medium.Open | func (m *Medium) Open(p string) (fs.File, error) |
dappco.re/go/core/io/sqlite |
Open opens the named file for reading. | yes |
| Medium.Read | func (m *Medium) Read(p string) (string, error) |
dappco.re/go/core/io/sqlite |
Read retrieves the content of a file as a string. | yes |
| Medium.ReadStream | func (m *Medium) ReadStream(p string) (goio.ReadCloser, error) |
dappco.re/go/core/io/sqlite |
ReadStream returns a reader for the file content. | yes |
| Medium.Rename | func (m *Medium) Rename(oldPath, newPath string) error |
dappco.re/go/core/io/sqlite |
Rename moves a file or directory from oldPath to newPath. | yes |
| Medium.Stat | func (m *Medium) Stat(p string) (fs.FileInfo, error) |
dappco.re/go/core/io/sqlite |
Stat returns file information for the given path. | yes |
| Medium.Write | func (m *Medium) Write(p, content string) error |
dappco.re/go/core/io/sqlite |
Write saves the given content to a file, overwriting it if it exists. | yes |
| Medium.WriteStream | func (m *Medium) WriteStream(p string) (goio.WriteCloser, error) |
dappco.re/go/core/io/sqlite |
WriteStream returns a writer for the file content. | yes |
| Medium | type Medium struct |
dappco.re/go/core/io/sqlite |
Medium is a SQLite-backed storage backend implementing the io.Medium interface. | yes |
| Option | type Option func(*Medium) |
dappco.re/go/core/io/sqlite |
Option configures a Medium. | no |
| New | func New(c *core.Core, crypt ...cryptProvider) (any, error) |
dappco.re/go/core/io/workspace |
New creates a new Workspace service instance. | yes |
| Workspace.CreateWorkspace | func (Workspace) CreateWorkspace(identifier, password string) (string, error) |
dappco.re/go/core/io/workspace |
Creates a new encrypted workspace. | yes |
| Workspace.SwitchWorkspace | func (Workspace) SwitchWorkspace(name string) error |
dappco.re/go/core/io/workspace |
Switches the active workspace. | yes |
| Workspace.WorkspaceFileGet | func (Workspace) WorkspaceFileGet(filename string) (string, error) |
dappco.re/go/core/io/workspace |
Reads a file from the active workspace. | yes |
| Workspace.WorkspaceFileSet | func (Workspace) WorkspaceFileSet(filename, content string) error |
dappco.re/go/core/io/workspace |
Writes a file into the active workspace. | yes |
| Service.CreateWorkspace | func (s *Service) CreateWorkspace(identifier, password string) (string, error) |
dappco.re/go/core/io/workspace |
CreateWorkspace creates a new encrypted workspace. | yes |
| Service.HandleIPCEvents | func (s *Service) HandleIPCEvents(c *core.Core, msg core.Message) core.Result |
dappco.re/go/core/io/workspace |
HandleIPCEvents handles workspace-related IPC messages. | no |
| Service.SwitchWorkspace | func (s *Service) SwitchWorkspace(name string) error |
dappco.re/go/core/io/workspace |
SwitchWorkspace changes the active workspace. | yes |
| Service.WorkspaceFileGet | func (s *Service) WorkspaceFileGet(filename string) (string, error) |
dappco.re/go/core/io/workspace |
WorkspaceFileGet retrieves the content of a file from the active workspace. | yes |
| Service.WorkspaceFileSet | func (s *Service) WorkspaceFileSet(filename, content string) error |
dappco.re/go/core/io/workspace |
WorkspaceFileSet saves content to a file in the active workspace. | yes |
| Service | type Service struct |
dappco.re/go/core/io/workspace |
Service implements the Workspace interface. | yes |
| Workspace | type Workspace interface |
dappco.re/go/core/io/workspace |
Workspace provides management for encrypted user workspaces. | no |