Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for decode (0.1 sec)

  1. cmd/batch-job-common-types.go

    // UnmarshalYAML - BatchJobKV extends default unmarshal to extract line, col information.
    func (kv *BatchJobKV) UnmarshalYAML(val *yaml.Node) error {
    	type jobKV BatchJobKV
    	var tmp jobKV
    	err := val.Decode(&tmp)
    	if err != nil {
    		return err
    	}
    	*kv = BatchJobKV(tmp)
    	kv.line, kv.col = val.Line, val.Column
    	return nil
    }
    
    // Validate returns an error if key is empty
    func (kv BatchJobKV) Validate() error {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 11 03:13:30 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  2. cmd/storage-datatypes_gen_test.go

    	v := BaseOptions{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    
    	m := v.Msgsize()
    	if buf.Len() > m {
    		t.Log("WARNING: TestEncodeDecodeBaseOptions Msgsize() is inaccurate")
    	}
    
    	vn := BaseOptions{}
    	err := msgp.Decode(&buf, &vn)
    	if err != nil {
    		t.Error(err)
    	}
    
    	buf.Reset()
    	msgp.Encode(&buf, &v)
    	err = msgp.NewReader(&buf).Skip()
    	if err != nil {
    		t.Error(err)
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 62.6K bytes
    - Viewed (0)
  3. cmd/storage-rest-client.go

    	if err != nil {
    		for i := range errs {
    			errs[i] = toStorageErr(err)
    		}
    		return errs
    	}
    
    	dErrResp := &DeleteVersionsErrsResp{}
    	if err = gob.NewDecoder(reader).Decode(dErrResp); err != nil {
    		for i := range errs {
    			errs[i] = toStorageErr(err)
    		}
    		return errs
    	}
    
    	for i, dErr := range dErrResp.Errs {
    		errs[i] = toStorageErr(dErr)
    	}
    
    	return errs
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 27.4K bytes
    - Viewed (0)
  4. cmd/batch-expire.go

    // UnmarshalYAML - BatchJobExpirePurge extends unmarshal to extract line, col
    func (p *BatchJobExpirePurge) UnmarshalYAML(val *yaml.Node) error {
    	type purge BatchJobExpirePurge
    	var tmp purge
    	err := val.Decode(&tmp)
    	if err != nil {
    		return err
    	}
    
    	*p = BatchJobExpirePurge(tmp)
    	p.line, p.col = val.Line, val.Column
    	return nil
    }
    
    // Validate returns nil if value is valid, ie > 0.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 11 13:50:53 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  5. internal/kms/config.go

    				if err != nil {
    					return tls.Certificate{}, fmt.Errorf("Unable to load KES client private key as specified by the shell environment: %v", err)
    				}
    				privateKeyPEM, rest := pem.Decode(bytes.TrimSpace(keyBytes))
    				if len(rest) != 0 {
    					return tls.Certificate{}, errors.New("Unable to load KES client private key as specified by the shell environment: private key contains additional data")
    				}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 12 14:31:26 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  6. cmd/metacache-entries.go

    		// Empty entry
    		if entry.name == "" {
    			continue
    		}
    
    		if entry.isDir() {
    			dirExists++
    			selected = entry
    			continue
    		}
    
    		// Get new entry metadata,
    		// shallow decode.
    		xl, err := entry.xlmeta()
    		if err != nil {
    			continue
    		}
    		objsValid++
    
    		// Add all valid to candidates.
    		r.candidates = append(r.candidates, xl.versions)
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 04:34:26 UTC 2024
    - 24K bytes
    - Viewed (0)
  7. cmd/object-handlers_test.go

    	// Assert the response code with the expected status.
    	if rec.Code != http.StatusOK {
    		t.Fatalf("%s:  Expected the response status to be `%d`, but instead found `%d`", instanceType, http.StatusOK, rec.Code)
    	}
    
    	// decode the response body.
    	decoder := xml.NewDecoder(rec.Body)
    	multipartResponse := &InitiateMultipartUploadResponse{}
    
    	err = decoder.Decode(multipartResponse)
    	if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 161.9K bytes
    - Viewed (0)
  8. cmd/utils.go

    	// On form submission, the last redirect response contains the auth
    	// code, which we now have in `lastReq`. Exchange it for a JWT id_token.
    	q := lastReq.URL.Query()
    	// fmt.Printf("lastReq.URL: %#v q: %#v\n", lastReq.URL, q)
    	code := q.Get("code")
    	oauth2Token, err := oauth2Config.Exchange(ctx, code)
    	if err != nil {
    		return "", fmt.Errorf("unable to exchange code for id token: %v", err)
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 05 22:00:34 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  9. cmd/encryption-v1.go

    		mac := hmac.New(sha256.New, key)
    		mac.Write([]byte(baseKey))
    		return sio.DecryptBuffer(nil, input, sio.Config{Key: mac.Sum(nil), CipherSuites: fips.DARECiphers()})
    	}
    }
    
    // decryptChecksums will attempt to decode checksums and return it/them if set.
    // if part > 0, and we have the checksum for the part that will be returned.
    func (o *ObjectInfo) decryptPartsChecksums(h http.Header) {
    	data := o.Checksum
    	if len(data) == 0 {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 06:56:12 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  10. cmd/storage-rest-server.go

    	if err != nil {
    		s.writeErrorResponse(w, err)
    		return
    	}
    
    	versions := make([]FileInfoVersions, totalVersions)
    	decoder := msgpNewReader(r.Body)
    	defer readMsgpReaderPoolPut(decoder)
    	for i := 0; i < totalVersions; i++ {
    		dst := &versions[i]
    		if err := dst.DecodeMsg(decoder); err != nil {
    			s.writeErrorResponse(w, err)
    			return
    		}
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 44.8K bytes
    - Viewed (0)
Back to top