ipfs

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPFSManager

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

func NewIPFSManager

func NewIPFSManager(logger *zap.Logger, options ...IPFSManagerOption) (*IPFSManager, error)

func (*IPFSManager) Cat

func (m *IPFSManager) Cat(cid string) ([]byte, proto.MiddlewareError)

func (*IPFSManager) Put

func (m *IPFSManager) Put(payload io.Reader) (string, proto.MiddlewareError)

func (*IPFSManager) Register

func (im *IPFSManager) Register(echo *echo.Echo) error

type IPFSManagerOption

type IPFSManagerOption func(mgr *IPFSManager) error

func WithIPFSStorage

func WithIPFSStorage(storage IPFSStorage) IPFSManagerOption

func WithUrl

func WithUrl(url string, port int) IPFSManagerOption

type IPFSStorage

type IPFSStorage interface {
	Version() (string, string, error)
	Add(payload io.Reader, opts ...ipfs.AddOpts) (string, error)
	Cat(cid string) (io.ReadCloser, error)
}

type StorageBackendError

type StorageBackendError struct{}

func (*StorageBackendError) Error

func (e *StorageBackendError) Error() string

func (*StorageBackendError) Message

func (*StorageBackendError) Status

func (e *StorageBackendError) Status() int

type StorageFileNotFoundError

type StorageFileNotFoundError struct{}

func (*StorageFileNotFoundError) Error

func (e *StorageFileNotFoundError) Error() string

func (*StorageFileNotFoundError) Message

func (*StorageFileNotFoundError) Status

func (e *StorageFileNotFoundError) Status() int

type UploadBase64DecodeError

type UploadBase64DecodeError struct{}

func (*UploadBase64DecodeError) Error

func (e *UploadBase64DecodeError) Error() string

func (*UploadBase64DecodeError) Message

func (*UploadBase64DecodeError) Status

func (e *UploadBase64DecodeError) Status() int

type UploadFileMissingError

type UploadFileMissingError struct{}

func (*UploadFileMissingError) Error

func (e *UploadFileMissingError) Error() string

func (*UploadFileMissingError) Message

func (*UploadFileMissingError) Status

func (e *UploadFileMissingError) Status() int

type UploadJSONDecodeError

type UploadJSONDecodeError struct{}

func (*UploadJSONDecodeError) Error

func (e *UploadJSONDecodeError) Error() string

func (*UploadJSONDecodeError) Message

func (*UploadJSONDecodeError) Status

func (e *UploadJSONDecodeError) Status() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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