Skip to content
Snippets Groups Projects
Commit d12ab437 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Merge branch 'hotfix/initsync' into 'project/HavenBeta'

Add NewSynchronizedCmix to bindings

See merge request !636
parents 243baab3 4f5d5817
No related branches found
No related tags found
2 merge requests!636Add NewSynchronizedCmix to bindings,!617Project/haven beta
......@@ -43,7 +43,8 @@ type Cmix struct {
// date.
//
// Users of this function should delete the storage directory on error.
func NewCmix(ndfJSON, storageDir string, password []byte, registrationCode string) error {
func NewCmix(ndfJSON, storageDir string, password []byte,
registrationCode string) error {
err := xxdk.NewCmix(ndfJSON, storageDir, password, registrationCode)
if err != nil {
return errors.Errorf("Failed to create new cmix: %+v", err)
......@@ -51,6 +52,14 @@ func NewCmix(ndfJSON, storageDir string, password []byte, registrationCode strin
return nil
}
// NewSynchronizedCmix clones a Cmix from remote storage
func NewSynchronizedCmix(ndfJSON, storageDir string, password []byte,
remote RemoteStore) error {
wrappedRemote := newRemoteStoreFileSystemWrapper(remote)
return xxdk.NewSynchronizedCmix(ndfJSON, storageDir, password,
wrappedRemote)
}
// LoadCmix will load an existing user storage from the storageDir using the
// password. This will fail if the user storage does not exist or the password
// is incorrect.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment