Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for IsValid (0.18 sec)

  1. cmd/erasure-metadata.go

    }
    
    // ShardSize - returns actual shared size from erasure blockSize.
    func (e ErasureInfo) ShardSize() int64 {
    	return ceilFrac(e.BlockSize, int64(e.DataBlocks))
    }
    
    // IsValid - tells if erasure info fields are valid.
    func (fi FileInfo) IsValid() bool {
    	if fi.Deleted {
    		// Delete marker has no data, no need to check
    		// for erasure coding information
    		return true
    	}
    	dataBlocks := fi.Erasure.DataBlocks
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  2. cmd/storage-rest-server.go

    	if err := storageServerRequestValidate(r); err != nil {
    		s.writeErrorResponse(w, err)
    		return false
    	}
    
    	return true
    }
    
    // IsValid - To authenticate and check if the disk-id in the request corresponds to the underlying disk.
    func (s *storageRESTServer) IsValid(w http.ResponseWriter, r *http.Request) bool {
    	if !s.IsAuthValid(w, r) {
    		return false
    	}
    
    	if err := r.ParseForm(); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  3. cmd/bucket-targets.go

    }
    
    // SetTarget - sets a new minio-go client target for this bucket.
    func (sys *BucketTargetSys) SetTarget(ctx context.Context, bucket string, tgt *madmin.BucketTarget, update bool) error {
    	if !tgt.Type.IsValid() && !update {
    		return BucketRemoteArnTypeInvalid{Bucket: bucket}
    	}
    	clnt, err := sys.getRemoteTargetClient(tgt)
    	if err != nil {
    		return BucketRemoteTargetNotFound{Bucket: tgt.TargetBucket, Err: err}
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  4. internal/config/storageclass/storage-class.go

    	type Alias Config
    	aux := &struct {
    		*Alias
    	}{
    		Alias: (*Alias)(sCfg),
    	}
    	return json.Unmarshal(data, &aux)
    }
    
    // IsValid - returns true if input string is a valid
    // storage class kind supported.
    func IsValid(sc string) bool {
    	return sc == RRS || sc == STANDARD
    }
    
    // UnmarshalText unmarshals storage class from its textual form into
    // storageClass structure.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  5. cmd/erasure-healing-common_test.go

    	}
    
    	// Iterate through all the modTimes and count the FileInfo(s) with latest time.
    	for index, t := range modTimes {
    		if partsMetadata[index].IsValid() && t.Equal(modTime) {
    			latestFileInfo = partsMetadata[index]
    			count++
    		}
    	}
    
    	if !latestFileInfo.IsValid() {
    		return FileInfo{}, errErasureReadQuorum
    	}
    
    	if count < latestFileInfo.Erasure.DataBlocks {
    		return FileInfo{}, errErasureReadQuorum
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 23K bytes
    - Viewed (1)
  6. cmd/object-multipart-handlers.go

    	sseConfig.Apply(r.Header, sse.ApplyOptions{
    		AutoEncrypt: globalAutoEncryption,
    	})
    
    	// Validate storage class metadata if present
    	if sc := r.Header.Get(xhttp.AmzStorageClass); sc != "" {
    		if !storageclass.IsValid(sc) {
    			writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrInvalidStorageClass), r.URL)
    			return
    		}
    	}
    
    	encMetadata := map[string]string{}
    
    	if crypto.Requested(r.Header) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 39K bytes
    - Viewed (0)
  7. cmd/erasure-healing-common.go

    			for index, e := range etags {
    				if partsMetadata[index].IsValid() && e == etag {
    					onlineDisks[index] = disks[index]
    				} else {
    					onlineDisks[index] = nil
    				}
    			}
    			return onlineDisks, modTime, etag
    		}
    	}
    
    	// Create a new online disks slice, which have common uuid.
    	for index, t := range modTimes {
    		if partsMetadata[index].IsValid() && t.Equal(modTime) {
    			onlineDisks[index] = disks[index]
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  8. internal/auth/credentials.go

    func (cred Credentials) IsImpliedPolicy() bool {
    	if cred.IsServiceAccount() {
    		return cred.Claims[iamPolicyClaimNameSA] == "inherited-policy"
    	}
    	return false
    }
    
    // IsValid - returns whether credential is valid or not.
    func (cred Credentials) IsValid() bool {
    	// Verify credentials if its enabled or not set.
    	if cred.Status == AccountOff {
    		return false
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 12:41:13 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  9. cmd/erasure-metadata-utils.go

    		if disks[i] == nil {
    			// Assuming offline drives as inconsistent,
    			// to be safe and fallback to original
    			// distribution order.
    			inconsistent++
    			continue
    		}
    		if !meta.IsValid() {
    			inconsistent++
    			continue
    		}
    		if meta.XLV1 != fi.XLV1 {
    			inconsistent++
    			continue
    		}
    		// check if erasure distribution order matches the index
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  10. cmd/erasure-healing.go

    	notFoundMetaErrs, nonActionableMetaErrs := danglingErrsCount(errs)
    	notFoundPartsErrs, nonActionablePartsErrs := danglingErrsCount(dataErrs)
    
    	for _, m := range metaArr {
    		if m.IsValid() {
    			validMeta = m
    			break
    		}
    	}
    
    	if !validMeta.IsValid() {
    		// validMeta is invalid because all xl.meta is missing apparently
    		// we should figure out if dataDirs are also missing > dataBlocks.
    		dataBlocks := (len(dataErrs) + 1) / 2
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 06:32:14 GMT 2024
    - 33.1K bytes
    - Viewed (0)
Back to top