Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirectoryRepair ¶
func DirectoryRepair(ctx context.Context, addr swarm.Address, opts ...Option) (swarm.Address, error)
DirectoryRepair takes in an older directory reference and creates a new manifest which contains all the files and the metadata. This reference can be then used to query the /bzz endpoint to serve the index document or /bzz/{reference}/{path} to query individual files
Old Entry: mantaray manifest -> Root Node (/) -> Metadata (index file/error file)
| |-> file entry -> collection -> file reference -> file bytes | |-> metadata reference -> metadata bytes
New Entry: mantaray manifest -> Root Node (/) -> Metadata (index file)
| |-> file entry -> Metadata (Filename, ContentType) | |-> File reference
func FileRepair ¶
FileRepair takes in an older file reference and creates a new manifest which contains the file and the metadata. This reference can be then used to query the /bzz endpoint to serve the file
Old Entry: collection -> file reference -> file bytes
| |-> metadata reference -> metadata bytes
New Entry: mantaray manifest -> Root Node (\) -> Metadata (index file)
| |-> file entry -> Metadata (Filename, ContentType) | |-> File reference
Types ¶
type Option ¶
type Option func(*Repairer)
Option is used to supply functional options for the repairer utility
func WithAPIStore ¶
WithAPIStore is used to configure the API endpoint for running the utility. This could be locally running bee node or some gateway
func WithEncryption ¶
WithEncryption is used to enable encryption while creating data
func WithLogger ¶
WithLogger is used to supply optional logger to see debug messages
func WithProgressUpdater ¶
func WithProgressUpdater(upd ProgressUpdater) Option
WithProgressUpdater is used to provide updater implementation to see updates from utility
type ProgressUpdater ¶
type ProgressUpdater interface {
Update(string)
}
ProgressUpdater is and interface which can be implemented by client to recieve updates from the utility