Documentation ¶
Index ¶
- Variables
- type Manager
- func (m *Manager) Close() error
- func (m *Manager) Create(ctx context.Context) (ffs.AuthEntry, error)
- func (m *Manager) GetByAuthToken(token string) (*api.API, error)
- func (m *Manager) GetDefaultStorageConfig() ffs.StorageConfig
- func (m *Manager) List() ([]ffs.AuthEntry, error)
- func (m *Manager) SetDefaultStorageConfig(dc ffs.StorageConfig) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAuthTokenNotFound returns when an auth-token doesn't exist. ErrAuthTokenNotFound = errors.New("auth token not found") )
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager creates Api instances, or loads existing ones them from an auth-token.
func New ¶
func New(ds datastore.Datastore, wm ffs.WalletManager, drm ffs.DealRecordsManager, sched *scheduler.Scheduler, ffsUseMasterAddr bool, onLocalnet bool) (*Manager, error)
New returns a new Manager.
func (*Manager) GetByAuthToken ¶
GetByAuthToken loads an existing instance using an auth-token. If auth-token doesn't exist, it returns ErrAuthTokenNotFound.
func (*Manager) GetDefaultStorageConfig ¶
func (m *Manager) GetDefaultStorageConfig() ffs.StorageConfig
GetDefaultStorageConfig returns the current default StorageConfig used for newly created FFS instances.
func (*Manager) SetDefaultStorageConfig ¶
func (m *Manager) SetDefaultStorageConfig(dc ffs.StorageConfig) error
SetDefaultStorageConfig sets the default StorageConfig to be set as default to newly created FFS instances.
Click to show internal directories.
Click to hide internal directories.