Versions in this module Expand all Collapse all v0 v0.2.0 Mar 13, 2019 v0.1.0 Jul 23, 2018 Changes in this version + const ChunkSize + var ErrUnauthorized = errors.New("peer not authorized for requested file") + type Host = ihost.Host + type Storage struct + FileHandler file.Handler + func NewStorage(host Host, db db.DB, storagePath string) *Storage + func (s *Storage) Authorize(ctx context.Context, pids [][]byte, fileHash []byte) error + func (s *Storage) PullFile(ctx context.Context, fileHash []byte, pid []byte) (err error) + func (s *Storage) StreamHandler(ctx context.Context, stream inet.Stream)