cas

package
v0.0.0-...-f572f87 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client will write new documents to IPFS and read existing documents from IPFS based on CID. It implements Sidetree CAS interface.

func New

func New(ipfs *shell.Shell) *Client

New creates cas client.

func (*Client) Read

func (m *Client) Read(cid string) ([]byte, error)

Read reads the content for the given CID from CAS. returns the contents of CID.

func (*Client) Write

func (m *Client) Write(content []byte) (string, error)

Write writes the given content to CAS. returns cid which represents the address of the content.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL