()
| 90 | } |
| 91 | |
| 92 | func (c *connectOptions) toRepoConnectOptions() *repo.ConnectOptions { |
| 93 | return &repo.ConnectOptions{ |
| 94 | CachingOptions: content.CachingOptions{ |
| 95 | CacheDirectory: c.connectCacheDirectory, |
| 96 | ContentCacheSizeBytes: c.contentCacheSizeMB << 20, //nolint:mnd |
| 97 | ContentCacheSizeLimitBytes: c.contentCacheSizeLimitMB << 20, //nolint:mnd |
| 98 | MetadataCacheSizeBytes: c.metadataCacheSizeMB << 20, //nolint:mnd |
| 99 | MetadataCacheSizeLimitBytes: c.metadataCacheSizeLimitMB << 20, //nolint:mnd |
| 100 | MaxListCacheDuration: content.DurationSeconds(c.maxListCacheDuration.Seconds()), |
| 101 | MinContentSweepAge: content.DurationSeconds(c.contentMinSweepAge.Seconds()), |
| 102 | MinMetadataSweepAge: content.DurationSeconds(c.metadataMinSweepAge.Seconds()), |
| 103 | MinIndexSweepAge: content.DurationSeconds(c.indexMinSweepAge.Seconds()), |
| 104 | }, |
| 105 | ClientOptions: repo.ClientOptions{ |
| 106 | Hostname: c.connectHostname, |
| 107 | Username: c.connectUsername, |
| 108 | ReadOnly: c.connectReadonly, |
| 109 | PermissiveCacheLoading: c.connectPermissiveCacheLoading, |
| 110 | Description: c.connectDescription, |
| 111 | EnableActions: c.connectEnableActions, |
| 112 | FormatBlobCacheDuration: c.getFormatBlobCacheDuration(), |
| 113 | }, |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | func (c *App) runConnectCommandWithStorage(ctx context.Context, co *connectOptions, st blob.Storage) error { |
| 118 | pass, err := c.getPasswordFromFlags(ctx, false, false) |
no test coverage detected