publicstorage

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callbacks

type Callbacks interface {
}

type Capabilities

type Capabilities struct {
}

type Plugin

type Plugin interface {
	fftypes.Named

	// InitPrefix initializes the set of configuration options that are valid, with defaults. Called on all plugins.
	InitPrefix(prefix config.Prefix)

	// Init initializes the plugin, with configuration
	// Returns the supported featureset of the interface
	Init(ctx context.Context, prefix config.Prefix, callbacks Callbacks) error

	// Capabilities returns capabilities - not called until after Init
	Capabilities() *Capabilities

	// PublishData publishes data to the Public Storage, and returns a payload reference ID
	PublishData(ctx context.Context, data io.Reader) (payloadRef string, err error)

	// RetrieveData reads data back from IPFS using the payload reference format returned from PublishData
	RetrieveData(ctx context.Context, payloadRef string) (data io.ReadCloser, err error)
}

Plugin is the interface implemented by each Public Storage plugin

Jump to

Keyboard shortcuts

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