github.com/keltia/go-ipfs@v0.3.8-0.20150909044612-210793031c63/repo/repo.go (about)

     1  package repo
     2  
     3  import (
     4  	"errors"
     5  	"io"
     6  
     7  	datastore "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
     8  
     9  	config "github.com/ipfs/go-ipfs/repo/config"
    10  )
    11  
    12  var (
    13  	ErrApiNotRunning = errors.New("api not running")
    14  )
    15  
    16  type Repo interface {
    17  	Config() (*config.Config, error)
    18  	SetConfig(*config.Config) error
    19  
    20  	SetConfigKey(key string, value interface{}) error
    21  	GetConfigKey(key string) (interface{}, error)
    22  
    23  	Datastore() datastore.ThreadSafeDatastore
    24  
    25  	// SetAPIAddr sets the API address in the repo.
    26  	SetAPIAddr(addr string) error
    27  
    28  	io.Closer
    29  }