Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for NewPutObjReader (0.14 sec)

  1. cmd/post-policy-fan-out.go

    				ActualSize: -1,
    				DisableMD5: true,
    			}
    			hr, err := hash.NewReaderWithOpts(ctx, bytes.NewReader(fanOutBuf), hopts)
    			if err != nil {
    				errs[idx] = err
    				return
    			}
    
    			reader := NewPutObjReader(hr)
    			defer func() {
    				if err := reader.Close(); err != nil {
    					errs[idx] = err
    				}
    				if err := hr.Close(); err != nil {
    					errs[idx] = err
    				}
    			}()
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. cmd/config-common.go

    	hashReader, err := hash.NewReader(ctx, bytes.NewReader(data), int64(len(data)), "", getSHA256Hash(data), int64(len(data)))
    	if err != nil {
    		return err
    	}
    
    	_, err = store.PutObject(ctx, minioMetaBucket, configFile, NewPutObjReader(hashReader), opts)
    	return err
    }
    
    func saveConfig(ctx context.Context, store objectIO, configFile string, data []byte) error {
    	return saveConfigWithOpts(ctx, store, configFile, data, ObjectOptions{MaxParity: true})
    }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 18 17:00:54 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  3. cmd/tier.go

    	payloadSize := int64(len(b))
    	br := bytes.NewReader(b)
    	hr, err := hash.NewReader(ctx, br, payloadSize, "", "", payloadSize)
    	if err != nil {
    		return nil, nil, err
    	}
    	if GlobalKMS == nil {
    		return NewPutObjReader(hr), &ObjectOptions{MaxParity: true}, nil
    	}
    
    	// Note: Local variables with names ek, oek, etc are named inline with
    	// acronyms defined here -
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 20:44:05 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  4. cmd/object-api-utils.go

    	}
    	p.Reader = encReader
    	p.sealMD5Fn = sealETagFn(*objEncKey)
    	return p, nil
    }
    
    // NewPutObjReader returns a new PutObjReader. It uses given hash.Reader's
    // MD5Current method to construct md5sum when requested downstream.
    func NewPutObjReader(rawReader *hash.Reader) *PutObjReader {
    	return &PutObjReader{Reader: rawReader, rawReader: rawReader}
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  5. cmd/batch-handlers.go

    	}
    	defer rd.Close()
    
    	hr, err := hash.NewReader(ctx, rd, objInfo.Size, "", "", objInfo.Size)
    	if err != nil {
    		return err
    	}
    	pReader := NewPutObjReader(hr)
    	_, err = api.PutObject(ctx, tgtBucket, tgtObject, pReader, opts)
    	return err
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 18 15:32:09 UTC 2024
    - 62.2K bytes
    - Viewed (0)
  6. cmd/erasure-server-pool-rebalance.go

    			if err != nil {
    				return fmt.Errorf("rebalanceObject: hash.NewReader() %w", err)
    			}
    			pi, err := z.PutObjectPart(ctx, bucket, oi.Name, res.UploadID,
    				part.Number,
    				NewPutObjReader(hr),
    				ObjectOptions{
    					PreserveETag: part.ETag, // Preserve original ETag to ensure same metadata.
    					IndexCB: func() []byte {
    						return part.Index // Preserve part Index to ensure decompression works.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 13:20:19 UTC 2024
    - 28.4K bytes
    - Viewed (0)
  7. cmd/erasure-server-pool-decom.go

    			if err != nil {
    				return fmt.Errorf("decommissionObject: hash.NewReader() %w", err)
    			}
    			pi, err := z.PutObjectPart(ctx, bucket, objInfo.Name, res.UploadID,
    				part.Number,
    				NewPutObjReader(hr),
    				ObjectOptions{
    					PreserveETag: part.ETag, // Preserve original ETag to ensure same metadata.
    					IndexCB: func() []byte {
    						return part.Index // Preserve part Index to ensure decompression works.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 13:20:19 UTC 2024
    - 42.2K bytes
    - Viewed (0)
  8. cmd/object-multipart-handlers.go

    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    	dstOpts.IndexCB = idxCb
    
    	rawReader := srcInfo.Reader
    	pReader := NewPutObjReader(rawReader)
    
    	var objectEncryptionKey crypto.ObjectKey
    	if isEncrypted {
    		if !crypto.SSEC.IsRequested(r.Header) && crypto.SSEC.IsEncrypted(mi.UserDefined) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Aug 31 18:25:48 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  9. cmd/object-handlers.go

    	}
    
    	srcInfo.Reader, err = hash.NewReader(ctx, reader, length, "", "", actualSize)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	pReader := NewPutObjReader(srcInfo.Reader)
    
    	// Handle encryption
    	encMetadata := make(map[string]string)
    	// Encryption parameters not applicable for this object.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 05 05:16:15 UTC 2024
    - 117.4K bytes
    - Viewed (0)
  10. cmd/metacache-set.go

    		r, err := hash.NewReader(ctx, bytes.NewReader(b.data), int64(len(b.data)), "", "", int64(len(b.data)))
    		bugLogIf(ctx, err)
    		custom := b.headerKV()
    		_, err = er.putMetacacheObject(ctx, o.objectPath(b.n), NewPutObjReader(r), ObjectOptions{
    			UserDefined: custom,
    		})
    		if err != nil {
    			mc.setErr(err.Error())
    			cancel()
    			return err
    		}
    		if b.n == 0 {
    			return nil
    		}
    		// Update block 0 metadata.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 16:23:16 UTC 2024
    - 30.7K bytes
    - Viewed (0)
Back to top