// Handle creates a KeyReaderAt suitable for constructing an Adapter
// that accesses objects on Amazon S3
Handle creates a KeyReaderAt suitable for constructing an Adapter
that accesses objects on Amazon S3
// Handle creates a KeyReaderAt suitable for constructing an Adapter // that accesses objects on Amazon S3
func Handle(ctx context.Context, opts ...S3Option) (*Handler, error) {
	handler := &Handler{
		ctx: ctx,
	}
	for _, o := range opts {
		o(handler)
	}
	if handler.client == nil {
		cfg, err := config.LoadDefaultConfig(ctx)
		if err != nil {
			return nil, fmt.Errorf("s3 client: %w", err)
		}
		handler.client = s3.NewFromConfig(cfg)
	}
	return handler, nil
}
func Handle ( ctx context . Context , opts ... S3Option ) ( * Handler , error ) { handler := & Handler { ctx : ctx , } for _ , o := range opts { o ( handler ) } if handler . client == nil { cfg , err := config . LoadDefaultConfig ( ctx ) if err != nil { return nil , fmt . Errorf ( " " , err ) } handler . client = s3 . NewFromConfig ( cfg ) } return handler , nil }
Handle creates a KeyReaderAt suitable for constructing an Adapter
that accesses objects on Amazon S3
Handle creates a KeyReaderAt suitable for constructing an Adapter that accesses objects on Amazon S3