ipfs

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 10 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 interface {
	GetImageFromIPFS(imagePath string) (image.Image, error)
	// contains filtered or unexported methods
}

func NewClient

func NewClient(endpoint string, options ...Option) (Client, error)

type IPFSClient added in v0.1.0

type IPFSClient struct {
	*httpapi.HttpApi
	ImageDecoder image.Decoder
}

func NewIPFSClient added in v0.1.0

func NewIPFSClient(endpoint string, options ...Option) (*IPFSClient, error)

endpoint must be in MultiAddr Format as specified under https://github.com/multiformats/multiaddr#encoding

func (*IPFSClient) GetImageFromIPFS added in v0.1.0

func (c *IPFSClient) GetImageFromIPFS(imagePath string) (image.Image, error)

type Option

type Option = func(c Client)

func WithJPEGDecoder

func WithJPEGDecoder() Option

func WithPNGDecoder

func WithPNGDecoder() Option

type WebClient added in v0.1.0

type WebClient struct {
	ImageDecoder image.Decoder
	// contains filtered or unexported fields
}

func NewWebClient added in v0.1.0

func NewWebClient(endpoint string, options ...Option) (*WebClient, error)

func (*WebClient) GetImageFromIPFS added in v0.1.0

func (c *WebClient) GetImageFromIPFS(imagePath string) (image.Image, error)

Jump to

Keyboard shortcuts

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