diff --git a/go.mod b/go.mod index d88b534..08d8ea3 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/docker/compose/v2 v2.6.0 github.com/docker/docker v20.10.7+incompatible github.com/mitchellh/mapstructure v1.5.0 - github.com/mutagen-io/mutagen v0.14.0 + github.com/mutagen-io/mutagen v0.15.0-beta1 github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 ) diff --git a/go.sum b/go.sum index ab81228..e6c4873 100644 --- a/go.sum +++ b/go.sum @@ -1098,8 +1098,8 @@ github.com/mutagen-io/fsevents v0.0.0-20180903111129-10556809b434 h1:PYeqqury0vV github.com/mutagen-io/fsevents v0.0.0-20180903111129-10556809b434/go.mod h1:kmTyqetTEgYl9KF5JlHLKL6LXnhs2/oK5100pcMZRn8= github.com/mutagen-io/gopass v0.0.0-20170602182606-9a121bec1ae7 h1:0PaUmAw6e54jseSG0ob2U9P1p6p+Sppw3sanphmM4LY= github.com/mutagen-io/gopass v0.0.0-20170602182606-9a121bec1ae7/go.mod h1:MyZ/hSGB6tVRgiUqOL62QdM31Sy+B8hvbA1roNTHmOc= -github.com/mutagen-io/mutagen v0.14.0 h1:5GZbJ+Ssh9TQlVuh8QyoaWVhg2D2wdPF2ErgX/01hrk= -github.com/mutagen-io/mutagen v0.14.0/go.mod h1:bo5dPG/5wLRC+tvRxwgV6oZvEc7jNK9r1FpY3NUUh5U= +github.com/mutagen-io/mutagen v0.15.0-beta1 h1://0c3HAPtEzV5FXj+2zu8lXOfZKsNHHgCka2SHEHFhY= +github.com/mutagen-io/mutagen v0.15.0-beta1/go.mod h1:bo5dPG/5wLRC+tvRxwgV6oZvEc7jNK9r1FpY3NUUh5U= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= diff --git a/pkg/mutagen/configuration.go b/pkg/mutagen/configuration.go index 62bb748..d739d21 100644 --- a/pkg/mutagen/configuration.go +++ b/pkg/mutagen/configuration.go @@ -1,8 +1,8 @@ package mutagen import ( - "github.com/mutagen-io/mutagen/pkg/configuration/forwarding" - "github.com/mutagen-io/mutagen/pkg/configuration/synchronization" + "github.com/mutagen-io/mutagen/pkg/api/models/forwarding" + "github.com/mutagen-io/mutagen/pkg/api/models/synchronization" ) // sidecarConfiguration encodes sidecar service configuration. diff --git a/pkg/mutagen/liaison.go b/pkg/mutagen/liaison.go index 3f7ab4a..2edeadd 100644 --- a/pkg/mutagen/liaison.go +++ b/pkg/mutagen/liaison.go @@ -183,15 +183,15 @@ func (l *Liaison) processProject(project *types.Project) error { } else if defaults.Destination != "" { return errors.New("destination URL not allowed in default forwarding configuration") } - defaultConfigurationForwarding = defaults.Configuration.Configuration() + defaultConfigurationForwarding = defaults.Configuration.ToInternal() if err := defaultConfigurationForwarding.EnsureValid(false); err != nil { return fmt.Errorf("invalid default forwarding configuration: %w", err) } - defaultConfigurationSource = defaults.ConfigurationSource.Configuration() + defaultConfigurationSource = defaults.ConfigurationSource.ToInternal() if err := defaultConfigurationSource.EnsureValid(true); err != nil { return fmt.Errorf("invalid default forwarding source configuration: %w", err) } - defaultConfigurationDestination = defaults.ConfigurationDestination.Configuration() + defaultConfigurationDestination = defaults.ConfigurationDestination.ToInternal() if err := defaultConfigurationDestination.EnsureValid(true); err != nil { return fmt.Errorf("invalid default forwarding destination configuration: %w", err) } @@ -208,15 +208,15 @@ func (l *Liaison) processProject(project *types.Project) error { } else if defaults.Beta != "" { return errors.New("beta URL not allowed in default synchronization configuration") } - defaultConfigurationSynchronization = defaults.Configuration.Configuration() + defaultConfigurationSynchronization = defaults.Configuration.ToInternal() if err := defaultConfigurationSynchronization.EnsureValid(false); err != nil { return fmt.Errorf("invalid default synchronization configuration: %w", err) } - defaultConfigurationAlpha = defaults.ConfigurationAlpha.Configuration() + defaultConfigurationAlpha = defaults.ConfigurationAlpha.ToInternal() if err := defaultConfigurationAlpha.EnsureValid(true); err != nil { return fmt.Errorf("invalid default synchronization alpha configuration: %w", err) } - defaultConfigurationBeta = defaults.ConfigurationBeta.Configuration() + defaultConfigurationBeta = defaults.ConfigurationBeta.ToInternal() if err := defaultConfigurationBeta.EnsureValid(true); err != nil { return fmt.Errorf("invalid default synchronization beta configuration: %w", err) } @@ -273,21 +273,21 @@ func (l *Liaison) processProject(project *types.Project) error { networkDependencies[network] = nil // Compute the session configuration. - configuration := session.Configuration.Configuration() + configuration := session.Configuration.ToInternal() if err := configuration.EnsureValid(false); err != nil { return fmt.Errorf("invalid forwarding session configuration for %s: %w", name, err) } configuration = forwarding.MergeConfigurations(defaultConfigurationForwarding, configuration) // Compute the source-specific configuration. - sourceConfiguration := session.ConfigurationSource.Configuration() + sourceConfiguration := session.ConfigurationSource.ToInternal() if err := sourceConfiguration.EnsureValid(true); err != nil { return fmt.Errorf("invalid forwarding session source configuration for %s: %w", name, err) } sourceConfiguration = forwarding.MergeConfigurations(defaultConfigurationSource, sourceConfiguration) // Compute the destination-specific configuration. - destinationConfiguration := session.ConfigurationDestination.Configuration() + destinationConfiguration := session.ConfigurationDestination.ToInternal() if err := destinationConfiguration.EnsureValid(true); err != nil { return fmt.Errorf("invalid forwarding session destination configuration for %s: %w", name, err) } @@ -379,21 +379,21 @@ func (l *Liaison) processProject(project *types.Project) error { } // Compute the session configuration. - configuration := session.Configuration.Configuration() + configuration := session.Configuration.ToInternal() if err := configuration.EnsureValid(false); err != nil { return fmt.Errorf("invalid synchronization session configuration for %s: %v", name, err) } configuration = synchronization.MergeConfigurations(defaultConfigurationSynchronization, configuration) // Compute the alpha-specific configuration. - alphaConfiguration := session.ConfigurationAlpha.Configuration() + alphaConfiguration := session.ConfigurationAlpha.ToInternal() if err := alphaConfiguration.EnsureValid(true); err != nil { return fmt.Errorf("invalid synchronization session alpha configuration for %s: %v", name, err) } alphaConfiguration = synchronization.MergeConfigurations(defaultConfigurationAlpha, alphaConfiguration) // Compute the beta-specific configuration. - betaConfiguration := session.ConfigurationBeta.Configuration() + betaConfiguration := session.ConfigurationBeta.ToInternal() if err := betaConfiguration.EnsureValid(true); err != nil { return fmt.Errorf("invalid synchronization session beta configuration for %s: %v", name, err) }