bucket

package
v0.0.0-...-8ae4d99 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PinFileURL = "/pinning/pinFileToIPFS"
	PinJSONURL = "/pinning/pinJSONToIPFS"
	UnpinURL   = "/pinning/unpin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	BaseURL   string
	APIKey    string
	APISecret string
}

func NewBucket

func NewBucket(baseURL, apiKey, apiSecret string) *Bucket

func (*Bucket) PinFileToIPFS

func (b *Bucket) PinFileToIPFS(ctx context.Context, file []byte, name string) (string, error)

func (*Bucket) PinJSONToIPFS

func (b *Bucket) PinJSONToIPFS(ctx context.Context, data []byte) (string, error)

func (*Bucket) Unpin

func (b *Bucket) Unpin(ctx context.Context, hash string) error

type PinResponse

type PinResponse struct {
	IpfsHash  string `json:"IpfsHash"`
	PinSize   int    `json:"PinSize"`
	Timestamp string `json:"Timestamp"`
}

Jump to

Keyboard shortcuts

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