Versions in this module Expand all Collapse all v0 v0.2.1 Sep 9, 2021 Changes in this version + const DefaultApiFile + const DefaultPathName + const DefaultPathRoot + const EnvDir + const TDirectory + const TFile + const TMetadata + const TRaw + const TSymlink + var FilesChcid filesChcid + var FilesLs filesLs + var FilesMkdir filesMkdir + var FilesRead filesRead + var FilesStat filesStat + var FilesWrite filesWrite + var KeyGen keyGen + type AddOpts = func(*RequestBuilder) error + func CidVersion(version int) AddOpts + func Hash(hash string) AddOpts + func OnlyHash(enabled bool) AddOpts + func Pin(enabled bool) AddOpts + func Progress(enabled bool) AddOpts + func RawLeaves(enabled bool) AddOpts + type Error struct + Code int + Command string + Message string + func (e *Error) Error() string + type FilesOpt func(*RequestBuilder) error + type FilesStatObject struct + Blocks int + CumulativeSize uint64 + Hash string + Local bool + Size uint64 + SizeLocal uint64 + Type string + WithLocality bool + type IdOutput struct + Addresses []string + AgentVersion string + ID string + ProtocolVersion string + PublicKey string + type IpfsObject struct + Data string + Links []ObjectLink + type Key struct + Id string + Name string + type KeyOpt func(*RequestBuilder) error + type KeyRenameObject struct + Id string + Now string + Overwrite bool + Was string + type Logger struct + func (l Logger) Close() error + func (l Logger) Next() (map[string]interface{}, error) + type LsLink struct + Hash string + Name string + Size uint64 + Type int + type LsObject struct + Links []*LsLink + type Message struct + Data []byte + From peer.ID + Seqno []byte + TopicIDs []string + type MfsLsEntry struct + Hash string + Name string + Size uint64 + Type uint8 + type ObjectLink struct + Hash string + Name string + Size uint64 + type ObjectStats struct + BlockSize int + CumulativeSize int + DataSize int + Hash string + LinksSize int + NumLinks int + type PeerInfo struct + Addrs []string + ID string + type PeersList struct + Peers []string + type PinInfo struct + Type string + type PinStreamInfo struct + Cid string + Type string + type PinType string + const DirectPin + const IndirectPin + const RecursivePin + type PubSubSubscription struct + func (s *PubSubSubscription) Cancel() error + func (s *PubSubSubscription) Next() (*Message, error) + type PublishResponse struct + Name string + Value string + type Request struct + ApiBase string + Args []string + Body io.Reader + Command string + Ctx context.Context + Headers map[string]string + Opts map[string]string + func NewRequest(ctx context.Context, url, command string, args ...string) *Request + func (r *Request) Send(c *http.Client) (*Response, error) + type RequestBuilder struct + func (r *RequestBuilder) Arguments(args ...string) *RequestBuilder + func (r *RequestBuilder) Body(body io.Reader) *RequestBuilder + func (r *RequestBuilder) BodyBytes(body []byte) *RequestBuilder + func (r *RequestBuilder) BodyString(body string) *RequestBuilder + func (r *RequestBuilder) Exec(ctx context.Context, res interface{}) error + func (r *RequestBuilder) Header(name, value string) *RequestBuilder + func (r *RequestBuilder) Option(key string, value interface{}) *RequestBuilder + func (r *RequestBuilder) Send(ctx context.Context) (*Response, error) + type Response struct + Error *Error + Output io.ReadCloser + func (r *Response) Close() error + func (r *Response) Decode(dec interface{}) error + type Shell struct + func NewLocalShell() *Shell + func NewShell(url string) *Shell + func NewShellWithClient(url string, client *gohttp.Client) *Shell + func (s *Shell) Add(r io.Reader, options ...AddOpts) (string, error) + func (s *Shell) AddDir(dir string) (string, error) + func (s *Shell) AddLink(target string) (string, error) + func (s *Shell) AddNoPin(r io.Reader) (string, error) + func (s *Shell) AddWithOpts(r io.Reader, pin bool, rawLeaves bool) (string, error) + func (s *Shell) BlockGet(path string) ([]byte, error) + func (s *Shell) BlockPut(block []byte, format, mhtype string, mhlen int) (string, error) + func (s *Shell) BlockStat(path string) (string, int, error) + func (s *Shell) BootstrapAdd(peers []string) ([]string, error) + func (s *Shell) BootstrapAddDefault() ([]string, error) + func (s *Shell) BootstrapRmAll() ([]string, error) + func (s *Shell) Cat(path string) (io.ReadCloser, error) + func (s *Shell) DagGet(ref string, out interface{}) error + func (s *Shell) DagPut(data interface{}, ienc, kind string) (string, error) + func (s *Shell) DagPutWithOpts(data interface{}, opts ...options.DagPutOption) (string, error) + func (s *Shell) FileList(path string) (*UnixLsObject, error) + func (s *Shell) FilesChcid(ctx context.Context, path string, options ...FilesOpt) error + func (s *Shell) FilesCp(ctx context.Context, src string, dest string) error + func (s *Shell) FilesFlush(ctx context.Context, path string) (string, error) + func (s *Shell) FilesLs(ctx context.Context, path string, options ...FilesOpt) ([]*MfsLsEntry, error) + func (s *Shell) FilesMkdir(ctx context.Context, path string, options ...FilesOpt) error + func (s *Shell) FilesMv(ctx context.Context, src string, dest string) error + func (s *Shell) FilesRead(ctx context.Context, path string, options ...FilesOpt) (io.ReadCloser, error) + func (s *Shell) FilesRm(ctx context.Context, path string, force bool) error + func (s *Shell) FilesStat(ctx context.Context, path string, options ...FilesOpt) (*FilesStatObject, error) + func (s *Shell) FilesWrite(ctx context.Context, path string, data io.Reader, options ...FilesOpt) error + func (s *Shell) FindPeer(peer string) (*PeerInfo, error) + func (s *Shell) Get(hash, outdir string) error + func (s *Shell) GetLogs(ctx context.Context) (Logger, error) + func (s *Shell) ID(peer ...string) (*IdOutput, error) + func (s *Shell) IsUp() bool + func (s *Shell) KeyGen(ctx context.Context, name string, options ...KeyOpt) (*Key, error) + func (s *Shell) KeyList(ctx context.Context) ([]*Key, error) + func (s *Shell) KeyRename(ctx context.Context, old string, new string, force bool) (*KeyRenameObject, error) + func (s *Shell) KeyRm(ctx context.Context, name string) ([]*Key, error) + func (s *Shell) List(path string) ([]*LsLink, error) + func (s *Shell) NewObject(template string) (string, error) + func (s *Shell) ObjectGet(path string) (*IpfsObject, error) + func (s *Shell) ObjectPut(obj *IpfsObject) (string, error) + func (s *Shell) ObjectStat(key string) (*ObjectStats, error) + func (s *Shell) Patch(root, action string, args ...string) (string, error) + func (s *Shell) PatchData(root string, set bool, data interface{}) (string, error) + func (s *Shell) PatchLink(root, path, childhash string, create bool) (string, error) + func (s *Shell) Pin(path string) error + func (s *Shell) Pins() (map[string]PinInfo, error) + func (s *Shell) PinsOfType(ctx context.Context, pinType PinType) (map[string]PinInfo, error) + func (s *Shell) PinsStream(ctx context.Context) (<-chan PinStreamInfo, error) + func (s *Shell) PubSubPublish(topic, data string) (err error) + func (s *Shell) PubSubSubscribe(topic string) (*PubSubSubscription, error) + func (s *Shell) Publish(node string, value string) error + func (s *Shell) PublishWithDetails(contentHash, key string, lifetime, ttl time.Duration, resolve bool) (*PublishResponse, error) + func (s *Shell) Refs(hash string, recursive bool) (<-chan string, error) + func (s *Shell) Request(command string, args ...string) *RequestBuilder + func (s *Shell) Resolve(id string) (string, error) + func (s *Shell) ResolvePath(path string) (string, error) + func (s *Shell) SetTimeout(d time.Duration) + func (s *Shell) StatsBW(ctx context.Context) (*p2pmetrics.Stats, error) + func (s *Shell) SwarmConnect(ctx context.Context, addr ...string) error + func (s *Shell) SwarmPeers(ctx context.Context) (*SwarmConnInfos, error) + func (s *Shell) Unpin(path string) error + func (s *Shell) Version() (string, string, error) + type SwarmConnInfo struct + Addr string + Latency string + Muxer string + Peer string + Streams []SwarmStreamInfo + type SwarmConnInfos struct + Peers []SwarmConnInfo + type SwarmStreamInfo struct + Protocol string + type UnixLsLink struct + Hash string + Name string + Size uint64 + Type string + type UnixLsObject struct + Hash string + Links []*UnixLsLink + Size uint64 + Type string