package iface import ( "context" // "io" options "gitlab.dms3.io/dms3/interface-go-dms3-core/options" corepath "gitlab.dms3.io/dms3/interface-go-dms3-core/path" path "gitlab.dms3.io/dms3/interface-go-dms3-core/path" // dms3ld "gitlab.dms3.io/dms3/go-ld-format" ) // IndexMakeEvent modeled after Unixfs AddEvent type IndexMakeEvent struct { Name string Path path.Resolved `json:",omitempty"` Bytes int64 `json:",omitempty"` Size string `json:",omitempty"` } // RepoList interface { type RepoList interface { // Name returns repository name Name() string // Id returns repository path Id() string } //type RepoList []RepoEntry // IndexAPI is the basic interface to immutable files in DMS3 type IndexAPI interface { // Add imports the data from the reader into merkledag file //Add(context.Context, io.Reader) (ResolvedPath, error) // Cat returns a reader for the file //Cat(context.Context, Path) (Reader, error) Index(ctx context.Context, path corepath.Path, opts ...options.IndexListOption) (RepoList, error) // Ls returns the list of links in a directory //Ls(context.Context, Path) ([]*dms3ld.Link, error) }