ipfs-cluster/adder/adder.go
Hector Sanjuan 8f1a15b279 Move adder.Params to api.AddParams. Re-use in other modules
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-08-07 20:12:05 +02:00

21 lines
460 B
Go

package adder
import (
"context"
"mime/multipart"
"github.com/ipfs/ipfs-cluster/api"
cid "github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log"
)
var logger = logging.Logger("adder")
// Adder represents a module capable of adding content to IPFS Cluster.
type Adder interface {
// FromMultipart adds from a multipart reader and returns
// the resulting CID.
FromMultipart(context.Context, *multipart.Reader, *api.AddParams) (*cid.Cid, error)
}