clients

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserAgent string

Functions

This section is empty.

Types

type BaseClient

type BaseClient struct {
	*http.Client
	BaseUrl     string
	BaseHeaders map[string]string
}

func (*BaseClient) DoRequest

func (c *BaseClient) DoRequest(ctx context.Context, r Request, output interface{}) error

type HTTPStatusError

type HTTPStatusError struct {
	Status int
	Body   string
}

func (*HTTPStatusError) Error

func (e *HTTPStatusError) Error() string

type IPFS

type IPFS interface {
	PinContent(ctx context.Context, name, contentType string, data io.Reader) (cid string, metadata interface{}, err error)
	Unpin(ctx context.Context, cid string) error
}

func NewPinataClientAPIKey

func NewPinataClientAPIKey(apiKey, apiSecret string, filesMetadata map[string]string) IPFS

func NewPinataClientJWT

func NewPinataClientJWT(jwt string, filesMetadata map[string]string) IPFS

type Request

type Request struct {
	Method, URL string
	Body        io.Reader
	ContentType string
	Headers     map[string]string
}

Jump to

Keyboard shortcuts

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