Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for Marshal (0.12 sec)

  1. cmd/admin-handlers-users.go

    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    	for k, v := range ldapUsers {
    		allCredentials[k] = v
    	}
    
    	// Marshal the response
    	data, err := json.Marshal(allCredentials)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	econfigData, err := madmin.EncryptData(password, data)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 03 23:11:02 UTC 2024
    - 85.1K bytes
    - Viewed (0)
  2. cmd/batch-handlers.go

    	ctx       context.Context      `msg:"-"`
    }
    
    func notifyEndpoint(ctx context.Context, ri *batchJobInfo, endpoint, token string) error {
    	if endpoint == "" {
    		return nil
    	}
    
    	buf, err := json.Marshal(ri)
    	if err != nil {
    		return err
    	}
    
    	ctx, cancel := context.WithTimeout(ctx, 10*time.Second)
    	defer cancel()
    
    	req, err := http.NewRequestWithContext(ctx, http.MethodPost, endpoint, bytes.NewReader(buf))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 18 15:32:09 UTC 2024
    - 62.2K bytes
    - Viewed (0)
  3. cmd/bucket-handlers.go

    	if err != nil {
    		apiErr := errorCodes.ToAPIErr(ErrInvalidArgument)
    		apiErr.Description = err.Error()
    		writeErrorResponse(ctx, w, apiErr, r.URL)
    		return
    	}
    
    	configData, err := xml.Marshal(config)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	// Deny object locking configuration settings on existing buckets without object lock enabled.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 12:24:04 UTC 2024
    - 63.4K bytes
    - Viewed (0)
  4. cmd/xl-storage-format-v2.go

    	}
    
    	return fi, nil
    }
    
    // Signature will return a signature that is expected to be the same across all disks.
    func (j *xlMetaV2DeleteMarker) Signature() [4]byte {
    	// Shallow copy
    	c := *j
    
    	// Marshal metadata
    	crc := hashDeterministicBytes(c.MetaSys)
    	c.MetaSys = nil
    	if bts, err := c.MarshalMsg(metaDataPoolGet()); err == nil {
    		crc ^= xxhash.Sum64(bts)
    		metaDataPoolPut(bts)
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 64K bytes
    - Viewed (1)
  5. internal/bucket/lifecycle/lifecycle_test.go

    		t.Fatal(err)
    	}
    
    	ruleSet := make(map[string]struct{})
    	for _, rule := range lc.Rules {
    		ruleBytes, err := xml.Marshal(rule)
    		if err != nil {
    			t.Fatal(err)
    		}
    		ruleSet[string(ruleBytes)] = struct{}{}
    	}
    	for _, rule := range lc1.Rules {
    		ruleBytes, err := xml.Marshal(rule)
    		if err != nil {
    			t.Fatal(err)
    		}
    		if _, ok := ruleSet[string(ruleBytes)]; !ok {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu May 23 01:12:48 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  6. common-protos/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto

      // it always corresponds to the version of the main resource.
      optional string subresource = 8;
    }
    
    // MicroTime is version of Time with microsecond level precision.
    //
    // +protobuf.options.marshal=false
    // +protobuf.as=Timestamp
    // +protobuf.options.(gogoproto.goproto_stringer)=false
    message MicroTime {
      // Represents seconds of UTC time since Unix epoch
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Mon Mar 11 18:43:24 UTC 2024
    - 53.3K bytes
    - Viewed (0)
  7. cmd/iam.go

    	if !sys.Initialized() {
    		return nil, errServerNotInitialized
    	}
    
    	d, err := sys.store.GetPolicyDoc(policyName)
    	if err != nil {
    		return nil, err
    	}
    
    	pdata, err := json.Marshal(d.Policy)
    	if err != nil {
    		return nil, err
    	}
    
    	return &madmin.PolicyInfo{
    		PolicyName: policyName,
    		Policy:     pdata,
    		CreateDate: d.CreateDate,
    		UpdateDate: d.UpdateDate,
    	}, nil
    }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 29 16:01:48 UTC 2024
    - 74.6K bytes
    - Viewed (0)
  8. cmd/test-utils_test.go

    			return &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(k)}
    		case *ecdsa.PrivateKey:
    			b, err := x509.MarshalECPrivateKey(k)
    			if err != nil {
    				fmt.Fprintf(os.Stderr, "Unable to marshal ECDSA private key: %v", err)
    				os.Exit(2)
    			}
    			return &pem.Block{Type: "EC PRIVATE KEY", Bytes: b}
    		default:
    			return nil
    		}
    	}
    
    	var priv interface{}
    	var err error
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 01 22:13:18 UTC 2024
    - 77K bytes
    - Viewed (0)
  9. cmd/peer-rest-server.go

    	case serviceRestart, serviceStop:
    		dryRun := vars.Get("dry-run") == "true" // This is only supported for `restart/stop`
    
    		waitingDisks := waitingDrivesNode()
    		if len(waitingDisks) > 0 {
    			buf, err := json.Marshal(waitingDisks)
    			if err != nil {
    				return np, grid.NewRemoteErr(err)
    			}
    			return np, grid.NewRemoteErrString(string(buf))
    		}
    		if !dryRun {
    			globalServiceSignalCh <- signal
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 04 11:32:32 UTC 2024
    - 53.2K bytes
    - Viewed (0)
  10. cmd/iam-store.go

    		if err := opts.sessionPolicy.Validate(); err != nil {
    			return updatedAt, err
    		}
    
    		if opts.sessionPolicy.Version != "" && len(opts.sessionPolicy.Statements) > 0 {
    			policyBuf, err := json.Marshal(opts.sessionPolicy)
    			if err != nil {
    				return updatedAt, err
    			}
    
    			if len(policyBuf) > maxSVCSessionPolicySize {
    				return updatedAt, errSessionPolicyTooLarge
    			}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Oct 14 16:35:37 UTC 2024
    - 83.2K bytes
    - Viewed (0)
Back to top