Versions in this module Expand all Collapse all v1 v1.0.1 Dec 19, 2019 Changes in this version + const DefaultHTTPListenAddr + const DefaultHTTPPort + const ManifestType + var SkipManifest = errors.New("skip this manifest") + func RegularSlashes(path string) (res string) + type Api struct + func NewApi(dpa *storage.DPA, dns Resolver) (self *Api) + func (a *Api) NewManifest() (storage.Key, error) + func (a *Api) NewManifestWalker(key storage.Key, quitC chan bool) (*ManifestWalker, error) + func (a *Api) NewManifestWriter(key storage.Key, quitC chan bool) (*ManifestWriter, error) + func (self *Api) AddFile(mhash, path, fname string, content []byte, nameresolver bool) (storage.Key, string, error) + func (self *Api) AppendFile(mhash, path, fname string, existingSize int64, content []byte, ...) (storage.Key, string, error) + func (self *Api) BuildDirectoryTree(mhash string, nameresolver bool) (key storage.Key, manifestEntryMap map[string]*manifestTrieEntry, err error) + func (self *Api) Get(key storage.Key, path string) (reader storage.LazySectionReader, mimeType string, status int, err error) + func (self *Api) Modify(key storage.Key, path, contentHash, contentType string) (storage.Key, error) + func (self *Api) Put(content, contentType string) (storage.Key, error) + func (self *Api) RemoveFile(mhash, path, fname string, nameresolver bool) (string, error) + func (self *Api) Resolve(uri *URI) (storage.Key, error) + func (self *Api) Retrieve(key storage.Key) storage.LazySectionReader + func (self *Api) Store(data io.Reader, size int64, wg *sync.WaitGroup) (key storage.Key, err error) + func (self *Api) Upload(uploadDir, index string) (hash string, err error) + type Config struct + BootNodes string + BzzAccount string + BzzKey string + Contract common.Address + Cors string + EnsAPIs []string + EnsRoot common.Address + ListenAddr string + NetworkId uint64 + Path string + Port string + PublicKey string + Swap *swap.SwapParams + SwapApi string + SwapEnabled bool + SyncEnabled bool + func NewDefaultConfig() (self *Config) + func (self *Config) Init(prvKey *ecdsa.PrivateKey) + type Control struct + func NewControl(api *Api, hive *network.Hive) *Control + func (self *Control) BlockNetworkRead(on bool) + func (self *Control) Hive() string + func (self *Control) SwapEnabled(on bool) + func (self *Control) SyncEnabled(on bool) + type ErrResolve error + type FileSystem struct + func NewFileSystem(api *Api) *FileSystem + func (self *FileSystem) Download(bzzpath, localpath string) error + func (self *FileSystem) Upload(lpath, index string) (string, error) + type Manifest struct + Entries []ManifestEntry + type ManifestEntry struct + ContentType string + Hash string + ModTime time.Time + Mode int64 + Path string + Size int64 + Status int + type ManifestList struct + CommonPrefixes []string + Entries []*ManifestEntry + type ManifestWalker struct + func (m *ManifestWalker) Walk(walkFn WalkFn) error + type ManifestWriter struct + func (m *ManifestWriter) AddEntry(data io.Reader, e *ManifestEntry) (storage.Key, error) + func (m *ManifestWriter) RemoveEntry(path string) error + func (m *ManifestWriter) Store() (storage.Key, error) + type MultiResolver struct + func NewMultiResolver(opts ...MultiResolverOption) (m *MultiResolver) + func (m MultiResolver) Resolve(addr string) (h common.Hash, err error) + type MultiResolverOption func(*MultiResolver) + func MultiResolverOptionWithResolver(r Resolver, tld string) MultiResolverOption + type NoResolverError struct + TLD string + func NewNoResolverError(tld string) *NoResolverError + func (e *NoResolverError) Error() string + type Resolver interface + Resolve func(string) (common.Hash, error) + type Response struct + Content string + MimeType string + Size int64 + Status int + type Storage struct + func NewStorage(api *Api) *Storage + func (self *Storage) Get(bzzpath string) (*Response, error) + func (self *Storage) Modify(rootHash, path, contentHash, contentType string) (newRootHash string, err error) + func (self *Storage) Put(content, contentType string) (string, error) + type URI struct + Addr string + Path string + Scheme string + func Parse(rawuri string) (*URI, error) + func (u *URI) DeprecatedImmutable() bool + func (u *URI) DeprecatedRaw() bool + func (u *URI) Hash() bool + func (u *URI) Immutable() bool + func (u *URI) List() bool + func (u *URI) Raw() bool + func (u *URI) String() string + type WalkFn func(entry *ManifestEntry) error