core

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIpfsNnode

func CreateIpfsNnode(cidComputeOnly bool) (*core.IpfsNode, error)

returns a go-ipfs node backend CoreAPI instance

Types

type CidGetter

type CidGetter interface {
	GetCid() cid.Cid
}

type PinGetter

type PinGetter interface {
	fmt.Stringer
	json.Marshaler
	// CID to be pinned recursively
	GetCid() cid.Cid
	// Optional name for pinned data; can be used for lookups later
	GetName() string
	// Optional list of multiaddrs known to provide the data
	GetOrigins() []string
	// Optional metadata for pin object
	GetMeta() map[string]string
}

PinGetter Getter for Pin object

type PinStatusGetter

type PinStatusGetter interface {
	fmt.Stringer
	json.Marshaler
	// Globally unique ID of the pin request; can be used to check the status of ongoing pinning, modification of pin object, or pin removal
	GetRequestId() string
	GetStatus() Status
	// Immutable timestamp indicating when a pin request entered a pinning service; can be used for filtering results and pagination
	GetCreated() time.Time
	GetPin() PinGetter
	// List of multiaddrs designated by pinning service for transferring any new data from external peers
	GetDelegates() []multiaddr.Multiaddr
	// Optional info for PinStatus response
	GetInfo() map[string]string
}

PinStatusGetter Getter for Pin object with status

func NewPinStatusGetter

func NewPinStatusGetter(status openapi.PinStatus) PinStatusGetter

type PinataResponseGetter

type PinataResponseGetter interface {
	fmt.Stringer
	json.Marshaler
	CidGetter
	GetPinSize() int32
	GetTimestamp() int64 // epoch in millis
}

PinataResponseGetter Getter for PinataResponse object

func NewPinataResponseGetter

func NewPinataResponseGetter(res openapi.PinataResponse) PinataResponseGetter

type PinningService

type PinningService string
const (
	Pinata      PinningService = "pinata"
	Web3Storage PinningService = "web3.storage"
	Other       PinningService = "other"
)

func (PinningService) GetFilePinBaseUrl

func (f PinningService) GetFilePinBaseUrl() string

func (PinningService) GetPinningServiceBaseUrl

func (f PinningService) GetPinningServiceBaseUrl() string

func (PinningService) String

func (f PinningService) String() string

type Status

type Status string
const (
	StatusUnknown Status = ""
	StatusQueued  Status = Status(openapi.QUEUED)
	StatusPinning Status = Status(openapi.PINNING)
	StatusPinned  Status = Status(openapi.PINNED)
	StatusFailed  Status = Status(openapi.FAILED)
)

func (Status) String

func (s Status) String() string

type Web3StorageResponseGetter

type Web3StorageResponseGetter interface {
	fmt.Stringer
	json.Marshaler
	CidGetter
}

PinataResponseGetter Getter for PinataResponse object

Jump to

Keyboard shortcuts

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