cas

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 3 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 implements writing and reading content

func New

func New(casClient dcasclient.DCAS) *Client

New returns a new client for managing content

func (*Client) Read

func (mc *Client) Read(cID string) ([]byte, error)

Read reads the content of the given content ID (CID) in DCAS. returns the content for the given CID. The CID must be encoded in the proper format, according to https://docs.ipfs.io/concepts/content-addressing/#identifier-formats

func (*Client) Write

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

Write stores content to DCAS. returns the content ID (CID) in V1 format (https://docs.ipfs.io/concepts/content-addressing/#version-1-v1)

Jump to

Keyboard shortcuts

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