MCPcopy
hub / github.com/kopia/kopia / runConnectCommandWithStorageAndPassword

Method runConnectCommandWithStorageAndPassword

cli/command_repository_connect.go:126–138  ·  view source on GitHub ↗
(ctx context.Context, co *connectOptions, st blob.Storage, password string)

Source from the content-addressed store, hash-verified

124}
125
126func (c *App) runConnectCommandWithStorageAndPassword(ctx context.Context, co *connectOptions, st blob.Storage, password string) error {
127 configFile := c.repositoryConfigFileName()
128 if err := passwordpersist.OnSuccess(
129 ctx, repo.Connect(ctx, configFile, st, password, co.toRepoConnectOptions()),
130 c.passwordPersistenceStrategy(), configFile, password); err != nil {
131 return errors.Wrap(err, "error connecting to repository")
132 }
133
134 log(ctx).Info("Connected to repository.")
135 c.maybeInitializeUpdateCheck(ctx, co)
136
137 return nil
138}

Callers 1

Calls 7

OnSuccessFunction · 0.92
ConnectFunction · 0.92
toRepoConnectOptionsMethod · 0.80
InfoMethod · 0.80

Tested by

no test coverage detected