Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for IsValid (0.2 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 Apr 28 19:28:10 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  3. cmd/erasure-metadata_test.go

    		{7, 4},
    		// Insert part.
    		{3, 2},
    		// Replace existing part.
    		{4, 3},
    		// Missing part.
    		{6, -1},
    	}
    
    	// Setup.
    	fi := newFileInfo("test-object", 8, 8)
    	fi.Erasure.Index = 1
    	if !fi.IsValid() {
    		t.Fatalf("unable to get xl meta")
    	}
    
    	// Test them.
    	for _, testCase := range testCases {
    		if testCase.expectedIndex > -1 {
    			partNumString := strconv.Itoa(testCase.partNum)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 26 00:31:12 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  4. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  5. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 26 06:32:14 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  6. scan.go

    }
    
    func scanIntoMap(mapValue map[string]interface{}, values []interface{}, columns []string) {
    	for idx, column := range columns {
    		if reflectValue := reflect.Indirect(reflect.Indirect(reflect.ValueOf(values[idx]))); reflectValue.IsValid() {
    			mapValue[column] = reflectValue.Interface()
    			if valuer, ok := mapValue[column].(driver.Valuer); ok {
    				mapValue[column], _ = valuer.Value()
    			} else if b, ok := mapValue[column].(sql.RawBytes); ok {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 09:53:11 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  7. cmd/erasure-object.go

    	freeVersionID := fi.TierFreeVersionID()
    	freeVersionMarker := fi.TierFreeVersion()
    
    	// Update `xl.meta` content on each disks.
    	for index := range metaArr {
    		if metaArr[index].IsValid() {
    			metaArr[index].ModTime = modTime
    			metaArr[index].VersionID = versionID
    			if !metaArr[index].InlineData() {
    				// If the data is not inlined, we may end up incorrectly
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 76.9K bytes
    - Viewed (2)
  8. cmd/iam-store.go

    	}
    
    	// When looking for a user's policies, we also check if the user
    	// and the groups they are member of are enabled.
    	u, ok := c.iamUsersMap[name]
    	if ok {
    		if !u.Credentials.IsValid() {
    			return nil, time.Time{}, nil
    		}
    	}
    
    	// For internal IDP regular/service account user accounts, the policy
    	// mapping is iamUserPolicyMap. For STS accounts, the parent user would be
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Apr 27 10:04:10 GMT 2024
    - 75.2K bytes
    - Viewed (2)
  9. cmd/admin-handlers-idp-ldap.go

    	var par madmin.PolicyAssociationReq
    	err = json.Unmarshal(reqBytes, &par)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInvalidRequest), r.URL)
    		return
    	}
    
    	if err := par.IsValid(); err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigBadJSON), r.URL)
    		return
    	}
    
    	// Call IAM subsystem
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  10. cmd/site-replication.go

    }
    
    func (s *siteReplicatorCred) Set(c auth.Credentials) {
    	s.Lock()
    	defer s.Unlock()
    	s.Creds = c
    }
    
    func (s *siteReplicatorCred) IsValid() bool {
    	s.RLock()
    	defer s.RUnlock()
    	return s.Creds.IsValid()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 184.1K bytes
    - Viewed (1)
Back to top