Versions in this module Expand all Collapse all v0 v0.0.11 Aug 15, 2022 Changes in this version + var DefaultPinTimeout = time.Minute * 5 + var DefaultVerifier = func(ctx context.Context, bg retrieve.BlockGetter, c cid.Cid, rsa readerSeekerAt) (int64, error) + var EstuaryTech = GatewayURL + var KeyPat = regexp.MustCompile(...) + func DefaultRetriever(ua *http.Client) *retrieve.R + type AI struct + I IPFSRemote + LinkGateway GatewayURL + PinTimeout time.Duration + Prep Preparer + R *retrieve.R + UA *http.Client + func (ai *AI) Extensions(a remote.Annex, want []string) []string + func (ai *AI) Init(a remote.Annex) error + func (ai *AI) ListConfigs(a remote.Annex) (css []remote.ConfigSetting) + func (ai *AI) Prepare(a remote.Annex) error + func (ai *AI) Present(a remote.Annex, key string) (bool, error) + func (ai *AI) Remove(a remote.Annex, key string) error + func (ai *AI) Retrieve(a remote.Annex, key, file string) error + func (ai *AI) Store(a remote.Annex, key, file string) error + type Key struct + Backend string + ChunkNum int64 + ChunkSize int64 + HasExt bool + Mtime int64 + Name string + Size int64 + func Decode(key string) (Key, error) type LocalNode + func (ln *LocalNode) IsTrusted() bool v0.0.10 Jul 7, 2022 Changes in this version + const DefaultGetPathPattern + const DefaultPollWait + var CloudflareIPFS = GatewayURL + var DefaultLinkGateway = DwebLink + var DwebLink = GatewayURL + var ErrCantPin = errors.New("client doesn't have access to the PSA endpoint") + var ErrUnprepared = errors.New("method called on unprepared remote") + var IPFSIo = GatewayURL + var InfuraIPFSIo = GatewayURL + var PinataCloud = GatewayURL + func NewCIDVerifier(bg blockGetter) *cidVerifier + type Gateway struct + UA *http.Client + URL GatewayURL + Verifier blockGetter + func (gw *Gateway) Get(ctx context.Context, c cid.Cid, fi readWriteSeekerAt) error + func (gw *Gateway) GetBlock(ctx context.Context, c cid.Cid) (blocks.Block, error) + func (gw *Gateway) String() string + type GatewayURL struct + API bool + Base string + SubDomainPattern string + func (gu GatewayURL) Block(c cid.Cid) string + func (gu GatewayURL) Public(c cid.Cid) string + type Getter interface + Get func(context.Context, cid.Cid, readWriteSeekerAt) error + type IA struct + I IPFSRemote + LinkGateway GatewayURL + Prep Preparer + UA *http.Client + func (ia *IA) Extensions(a remote.Annex, want []string) []string + func (ia *IA) Init(a remote.Annex) error + func (ia *IA) ListConfigs(a remote.Annex) (css []remote.ConfigSetting) + func (ia *IA) Prepare(a remote.Annex) error + func (ia *IA) Present(a remote.Annex, key string) (bool, error) + func (ia *IA) Remove(a remote.Annex, key string) error + func (ia *IA) Retrieve(a remote.Annex, key, file string) error + func (ia *IA) Store(a remote.Annex, key, file string) error + type IPFSRemote interface + IsPresent func(context.Context, cid.Cid) (bool, error) + Pin func(context.Context, cid.Cid, string) error + Unpin func(context.Context, cid.Cid) error + Upload func(context.Context, fs.File, *Progress) (cid.Cid, error) + type LocalNode struct + func (ln *LocalNode) Get(ctx context.Context, c cid.Cid, ws readWriteSeekerAt) error + func (ln *LocalNode) String() string + type Preparer interface + Prepare func(remote.Annex, *http.Client) (IPFSRemote, error) + type Progress struct + Err error + FileSize int64 + Fn func(int64) + IsClosed bool + TotalReported int64 + func NewProgress(fn func(int64), fileSize int64) *Progress + func (pr *Progress) Close() error + func (pr *Progress) NewReader(orig io.Reader) io.ReadCloser + func (pro *Progress) SetOverhead(over int64) + type ProgressReader struct + func (pr *ProgressReader) Close() error + func (pr *ProgressReader) Read(p []byte) (int, error) + type RemotePinner struct + PollWait *time.Duration + func NewRemotePinner(endpoint, jwt string, ua *http.Client) *RemotePinner + func (rp *RemotePinner) IsPinned(ctx context.Context, c cid.Cid) (bool, error) + func (rp *RemotePinner) Pin(ctx context.Context, c cid.Cid, key string) error + func (rp *RemotePinner) Unpin(ctx context.Context, c cid.Cid) error + type Transport struct + func NewTransport() *Transport