func Open(ctx context.Context, configFile, password string, options *Options) (rep Repository, err error) {
	ctx, span := tracer.Start(ctx, "OpenRepository")
	defer span.End()

	defer func() {
		if err != nil {
			log(ctx).Errorf("failed to open repository: %v", err)
		}
	}()

	if options == nil {
		options = &Options{}
	}

	configFile, err = filepath.Abs(configFile)
	if err != nil {
		return nil, errors.Wrap(err, "error resolving config file path")
	}

	lc, err := LoadConfigFromFile(configFile)
	if err != nil {
		return nil, err
	}

	if lc.APIServer != nil {
		return OpenAPIServer(ctx, lc.APIServer, lc.ClientOptions, lc.Caching, password)
	}

	return openDirect(ctx, configFile, lc, password, options)
}
// Open opens a Repository specified in the configuration file.
Open opens a Repository specified in the configuration file.
// Open opens a Repository specified in the configuration file .
func Open(ctx context.Context, configFile, password string, options *Options) (rep Repository, err error) {
	ctx, span := tracer.Start(ctx, "OpenRepository")
	defer span.End()
	defer func() {
		if err != nil {
			log(ctx).Errorf("failed to open repository: %v", err)
		}
	}()
	if options == nil {
		options = &Options{}
	}
	configFile, err = filepath.Abs(configFile)
	if err != nil {
		return nil, errors.Wrap(err, "error resolving config file path")
	}
	lc, err := LoadConfigFromFile(configFile)
	if err != nil {
		return nil, err
	}
	if lc.APIServer != nil {
		return OpenAPIServer(ctx, lc.APIServer, lc.ClientOptions, lc.Caching, password)
	}
	return openDirect(ctx, configFile, lc, password, options)
}
func Open ( ctx context . Context , configFile , password string , options * Options ) ( rep Repository , err error ) { ctx , span := tracer . Start ( ctx , " " ) defer span . End ( ) defer func ( ) { if err != nil { log ( ctx ) . Errorf ( " " , err ) } } ( ) if options == nil { options = & Options { } } configFile , err = filepath . Abs ( configFile ) if err != nil { return nil , errors . Wrap ( err , " " ) } lc , err := LoadConfigFromFile ( configFile ) if err != nil { return nil , err } if lc . APIServer != nil { return OpenAPIServer ( ctx , lc . APIServer , lc . ClientOptions , lc . Caching , password ) } return openDirect ( ctx , configFile , lc , password , options ) }
Open opens a Repository specified in the configuration file.
Open opens a Repository specified in the configuration file .