Documentation ¶
Index ¶
- Constants
- type ID
- type LabelKey
- type LabelValue
- type Manager
- func (m *Manager) AddLabel(id ID, key LabelKey, value LabelValue) error
- func (m *Manager) AllocateCAR(id ID) (path string, err error)
- func (m *Manager) CARPathFor(dagRoot cid.Cid) (string, error)
- func (m *Manager) CreateImport() (id ID, err error)
- func (m *Manager) Info(id ID) (*Meta, error)
- func (m *Manager) List() ([]ID, error)
- func (m *Manager) Remove(id ID) error
- type Meta
Constants ¶
View Source
const ( CAROwnerImportMgr = "importmgr" CAROwnerUser = "user" )
View Source
const ( LSource = LabelKey("source") // Function which created the import LRootCid = LabelKey("root") // Root CID LFileName = LabelKey("filename") // Local file path of the source file. LCARPath = LabelKey("car_path") // Path of the CARv2 file containing the imported data. LCAROwner = LabelKey("car_owner") // Owner of the CAR; "importmgr" is us; "user" or empty is them. )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LabelValue ¶
type LabelValue = string
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) AddLabel ¶
func (m *Manager) AddLabel(id ID, key LabelKey, value LabelValue) error
AddLabel adds a label associated with an import, such as the source, car path, CID, etc.
func (*Manager) AllocateCAR ¶
AllocateCAR creates a new CAR allocated to the supplied import under the root directory.
func (*Manager) CARPathFor ¶
func (*Manager) CreateImport ¶
CreateImport initializes a new import, returning its ID and optionally a CAR path where to place the data, if requested.
type Meta ¶
type Meta struct {
Labels map[LabelKey]LabelValue
}
Click to show internal directories.
Click to hide internal directories.