ipfs

package
v0.0.0-...-741ffd6 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPFSClient

type IPFSClient interface {
	Add(data *bytes.Reader) (hash string, error error)
	Cat(path string) (io.ReadCloser, error)
}

type IPFSClientWrapper

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

func NewIPFSClientWrapper

func NewIPFSClientWrapper(client *shell.Shell) *IPFSClientWrapper

func (*IPFSClientWrapper) Add

func (i *IPFSClientWrapper) Add(data *bytes.Reader) (string, error)

func (*IPFSClientWrapper) Cat

func (i *IPFSClientWrapper) Cat(path string) (io.ReadCloser, error)

type IpfsStorageRepository

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

func NewStorageRepository

func NewStorageRepository(client IPFSClient) (i *IpfsStorageRepository)

func (*IpfsStorageRepository) GetById

func (i *IpfsStorageRepository) GetById(id string) string

func (*IpfsStorageRepository) Save

func (i *IpfsStorageRepository) Save(data string) (id string)

type StorageRepository

type StorageRepository interface {
	Save(data string) (id string)
	GetById(id string) (data string)
}

Jump to

Keyboard shortcuts

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