Documentation ¶
Index ¶
Constants ¶
View Source
const ( CidLength = 36 ZeroPeersTimeout = 2 * time.Minute )
Variables ¶
View Source
var ( EmptyCid cid.Cid MinCid [CidLength]byte MaxCid [CidLength]byte )
Functions ¶
func GetVersion ¶
Types ¶
type Proxy ¶
type Proxy interface { Add(data []byte, pin bool) (cid.Cid, error) Get(key []byte) ([]byte, error) LoadTo(key []byte, to io.Writer, ctx context.Context, onLoading func(size, loaded int64)) error Pin(key []byte) error Unpin(key []byte) error Cid(data []byte) (cid.Cid, error) Port() int PeerId() string AddFile(absPath string, data io.ReadCloser, fi os.FileInfo) (cid.Cid, error) Host() core2.Host ShouldPin(dataType DataType) bool }
func NewIpfsProxy ¶
func NewMemoryIpfsProxy ¶
func NewMemoryIpfsProxy() Proxy
Click to show internal directories.
Click to hide internal directories.