Versions in this module Expand all Collapse all v0 v0.1.5 Jul 2, 2025 Changes in this version + const BlockSize + const DefaultIPFSEndpoint + const MiniBlockSize + const MiniThreshold + const NanoBlockSize + const NanoThreshold + const ProtocolVersion + func DeRandomizeBlock(block []byte, dataSize int) []byte + func GenerateRandomBlocks(data []byte, blockSize int) ([][]byte, error) + func XORBlocks(a, b []byte) []byte + func XORBlocksInPlace(a, b []byte) + type BlockCache struct + type FileRepresentation struct + BlockHashes []string + BlockSize int + ContentType string + Descriptors [][]string + FileName string + FileSize int64 + Timestamp int64 + Version string + type RandomFS struct + func NewRandomFS(ipfsAPI string, dataDir string, cacheSize int64) (*RandomFS, error) + func NewRandomFSWithOptions(ipfsAPI string, dataDir string, cacheSize int64, skipIPFSTest bool) (*RandomFS, error) + func NewRandomFSWithoutIPFS(dataDir string, cacheSize int64) (*RandomFS, error) + func (rfs *RandomFS) GetStats() Stats + func (rfs *RandomFS) RetrieveFile(repHash string) ([]byte, *FileRepresentation, error) + func (rfs *RandomFS) StoreFile(filename string, data []byte, contentType string) (*RandomURL, error) + type RandomURL struct + FileName string + FileSize int64 + Host string + RepHash string + Scheme string + Timestamp int64 + Version string + func ParseRandomURL(rawURL string) (*RandomURL, error) + func (ru *RandomURL) String() string + type Stats struct + BlocksGenerated int64 + CacheHits int64 + CacheMisses int64 + FilesStored int64 + TotalSize int64