Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 1,103 for if (0.13 sec)

  1. internal/bucket/replication/sourceselectioncriteria.go

    	ssc := sourceSelectionCriteria{}
    	if err := dec.DecodeElement(&ssc, &start); err != nil {
    		return err
    	}
    	if len(ssc.ReplicaModifications.Status) == 0 {
    		ssc.ReplicaModifications.Status = Enabled
    	}
    	*s = SourceSelectionCriteria(ssc)
    	return nil
    }
    
    // MarshalXML - encodes to XML data.
    func (s SourceSelectionCriteria) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
    	if err := e.EncodeToken(start); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  2. internal/bucket/encryption/bucket-sse-config.go

    // set minimal SSE-KMS headers if autoEncrypt is true and the BucketSSEConfig
    // is nil.
    func (b *BucketSSEConfig) Apply(headers http.Header, opts ApplyOptions) {
    	if crypto.Requested(headers) {
    		return
    	}
    	if b == nil {
    		if opts.AutoEncrypt {
    			headers.Set(xhttp.AmzServerSideEncryption, xhttp.AmzEncryptionKMS)
    		}
    		return
    	}
    
    	switch b.Algo() {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Oct 25 00:44:15 GMT 2022
    - 4.9K bytes
    - Viewed (0)
  3. internal/kms/single-key_test.go

    	if err != nil {
    		t.Fatalf("Failed to generate key: %v", err)
    	}
    	plaintext, err := KMS.DecryptKey(key.KeyID, key.Ciphertext, Context{})
    	if err != nil {
    		t.Fatalf("Failed to decrypt key: %v", err)
    	}
    	if !bytes.Equal(key.Plaintext, plaintext) {
    		t.Fatalf("Decrypted key does not match generated one: got %x - want %x", key.Plaintext, plaintext)
    	}
    }
    
    func TestDecryptKey(t *testing.T) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jul 19 01:54:27 GMT 2022
    - 3K bytes
    - Viewed (0)
  4. internal/s3select/sql/parser_test.go

    		t.Fatal(err)
    	}
    	if len(tokens) != 7 {
    		t.Errorf("Expected 7 got %d", len(tokens))
    	}
    	// for i, t := range tokens {
    	// 	fmt.Printf("%d: %#v\n", i, t)
    	// }
    }
    
    func TestParseSelectStatement(t *testing.T) {
    	exp, err := ParseSelectStatement("select _3,_1,_2 as 'mytest'  from S3object")
    	if err != nil {
    		t.Fatalf("parse alias sql error: %v", err)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  5. cmd/metrics-v2.go

    				}
    			}
    			if g.metricsGroupOpts.dependGlobalIAMSys {
    				if globalIAMSys == nil {
    					return []MetricV2{}, nil
    				}
    			}
    			if g.metricsGroupOpts.dependGlobalLockServer {
    				if globalLockServer == nil {
    					return []MetricV2{}, nil
    				}
    			}
    			if g.metricsGroupOpts.dependGlobalIsDistErasure {
    				if !globalIsDistErasure {
    					return []MetricV2{}, nil
    				}
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 22:01:31 GMT 2024
    - 132.6K bytes
    - Viewed (0)
  6. internal/config/etcd/etcd.go

    	var etcdSecure bool
    	for _, endpoint := range etcdEndpoints {
    		u, err := xnet.ParseHTTPURL(endpoint)
    		if err != nil {
    			return nil, false, err
    		}
    		if etcdSecure && u.Scheme == "http" {
    			return nil, false, config.Errorf("all endpoints should be https or http: %s", endpoint)
    		}
    		// If one of the endpoint is https, we will use https directly.
    		etcdSecure = etcdSecure || u.Scheme == "https"
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  7. cmd/config-current_test.go

    	)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if site.Region != "us-west-1" {
    		t.Errorf("Expecting region `us-west-1` found %s", globalSite.Region)
    	}
    
    	if err := saveServerConfig(context.Background(), objLayer, globalServerConfig); err != nil {
    		t.Fatalf("Unable to save updated config file %s", err)
    	}
    
    	// Initialize server config.
    	if err := loadConfig(objLayer, nil); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Dec 19 19:10:14 GMT 2022
    - 2K bytes
    - Viewed (0)
  8. cmd/object-api-getobjectinfo_test.go

    		if err != nil && !testCase.shouldPass {
    			if testCase.err.Error() != err.Error() {
    				t.Errorf("Test %d: %s: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead", i+1, instanceType, testCase.err.Error(), err.Error())
    			}
    		}
    
    		// Test passes as expected, but the output values are verified for correctness here.
    		if err == nil && testCase.shouldPass {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 23 15:46:00 GMT 2022
    - 5.6K bytes
    - Viewed (0)
  9. cmd/storage-errors.go

    // interpretation.
    func osErrToFileErr(err error) error {
    	if err == nil {
    		return nil
    	}
    	if osIsNotExist(err) {
    		return errFileNotFound
    	}
    	if osIsPermission(err) {
    		return errFileAccessDenied
    	}
    	if isSysErrNotDir(err) || isSysErrIsDir(err) {
    		return errFileNotFound
    	}
    	if isSysErrPathNotFound(err) {
    		return errFileNotFound
    	}
    	if isSysErrTooManyFiles(err) {
    		return errTooManyOpenFiles
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  10. internal/event/arn_test.go

    	}
    
    	for i, testCase := range testCases {
    		data, err := xml.Marshal(testCase.arn)
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    			t.Fatalf("test %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
    		}
    
    		if !testCase.expectErr {
    			if !reflect.DeepEqual(data, testCase.expectedData) {
    				t.Fatalf("test %v: data: expected: %v, got: %v", i+1, string(testCase.expectedData), string(data))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 3.8K bytes
    - Viewed (0)
Back to top