Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 214 for Case (0.42 sec)

  1. internal/config/identity/openid/provider/keycloak.go

    	}
    	defer resp.Body.Close()
    	switch resp.StatusCode {
    	case http.StatusOK, http.StatusPartialContent:
    		var u User
    		if err = json.NewDecoder(resp.Body).Decode(&u); err != nil {
    			return User{}, err
    		}
    		return u, nil
    	case http.StatusNotFound:
    		return User{
    			ID:      userid,
    			Enabled: false,
    		}, nil
    	case http.StatusUnauthorized:
    		return User{}, ErrAccessTokenExpired
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 29 01:27:09 GMT 2022
    - 4.6K bytes
    - Viewed (0)
  2. cmd/bucket-encryption_test.go

    		_, err := validateBucketSSEConfig(bytes.NewReader([]byte(tc.inputXML)))
    		if tc.shouldPass && err != nil {
    			t.Fatalf("Test case %d: Expected to succeed but got %s", i+1, err)
    		}
    
    		if !tc.shouldPass {
    			if err == nil || err != nil && err.Error() != tc.expectedErr.Error() {
    				t.Fatalf("Test case %d: Expected %s but got %s", i+1, tc.expectedErr, err)
    			}
    		}
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 14 07:59:05 GMT 2021
    - 2.1K bytes
    - Viewed (0)
  3. internal/event/target/webhook.go

    	// already present we can blindly use the
    	// authToken as is instead of adding 'Bearer'
    	tokens := strings.Fields(target.args.AuthToken)
    	switch len(tokens) {
    	case 2:
    		req.Header.Set("Authorization", target.args.AuthToken)
    	case 1:
    		req.Header.Set("Authorization", "Bearer "+target.args.AuthToken)
    	}
    
    	req.Header.Set("Content-Type", "application/json")
    
    	resp, err := target.httpClient.Do(req)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Nov 20 22:40:07 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  4. internal/grid/README.md

            fmt.Println("Subroute:", GetSubroute(ctx))
            for {
                select {
                case <-ctx.Done():
                    return nil
                case req, ok := <-in:
                    if !ok {
                        break
                    }           
                    // Do something with payload
                    out <- []byte("response")
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  5. cmd/object-api-getobjectinfo_test.go

    	if err != nil {
    		t.Fatalf("%s : %s", instanceType, err.Error())
    	}
    
    	resultCases := []ObjectInfo{
    		// ObjectInfo -1.
    		// ObjectName set to a existing object in the test case (Test case 14).
    		{Bucket: "test-getobjectinfo", Name: "Asia/asiapics.jpg", ContentType: "image/jpeg", IsDir: false},
    		{Bucket: "test-getobjectinfo", Name: "Asia/empty-dir/", ContentType: "application/octet-stream", IsDir: true},
    	}
    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)
  6. cmd/tier-handlers.go

    	}
    
    	// Disallow remote tiers with internal storage class names
    	switch cfg.Name {
    	case storageclass.STANDARD, storageclass.RRS:
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, errTierReservedName), r.URL)
    		return
    	}
    
    	// Refresh from the disk in case we had missed notifications about edits from peers.
    	if err := globalTierConfigMgr.Reload(ctx, objAPI); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 15 19:52:44 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  7. cmd/license-update.go

    	ctx, cancel := globalLeaderLock.GetLock(ctx)
    	defer cancel()
    
    	licenseUpdateTimer := time.NewTimer(licUpdateCycle)
    	defer licenseUpdateTimer.Stop()
    
    	for {
    		select {
    		case <-ctx.Done():
    			return
    		case <-licenseUpdateTimer.C:
    
    			if globalSubnetConfig.Registered() {
    				performLicenseUpdate(ctx, objAPI)
    			}
    
    			// Reset the timer for next cycle.
    			licenseUpdateTimer.Reset(licUpdateCycle)
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  8. internal/logger/target/kafka/kafka_scram_client_contrib.go

    )
    
    func initScramClient(cfg Config, config *sarama.Config) {
    	switch strings.ToLower(cfg.SASL.Mechanism) {
    	case "sha512":
    		config.Net.SASL.SCRAMClientGeneratorFunc = func() sarama.SCRAMClient { return &XDGSCRAMClient{HashGeneratorFcn: KafkaSHA512} }
    		config.Net.SASL.Mechanism = sarama.SASLMechanism(sarama.SASLTypeSCRAMSHA512)
    	case "sha256":
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Nov 09 04:04:01 GMT 2023
    - 3.3K bytes
    - Viewed (1)
  9. cmd/erasure-common.go

    		toAdd := ReadMultipleResp{
    			Bucket: req.Bucket,
    			Prefix: req.Prefix,
    			File:   wantFile,
    		}
    		for i := range resps {
    			if disks[i] == nil {
    				continue
    			}
    			select {
    			case <-ctx.Done():
    			case gotFile, ok := <-resps[i]:
    				if !ok {
    					continue
    				}
    				if gotFile.Error != "" || !gotFile.Exists {
    					continue
    				}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  10. cmd/generic-handlers_test.go

    		r.Header = test.Header
    		r.URL = test.URL
    
    		h := setRequestValidityMiddleware(okHandler)
    		h.ServeHTTP(w, r)
    
    		switch {
    		case test.ShouldFail && w.Code == http.StatusOK:
    			t.Errorf("Test %d: should fail but status code is HTTP %d", i, w.Code)
    		case !test.ShouldFail && w.Code != http.StatusOK:
    			t.Errorf("Test %d: should not fail but status code is HTTP %d and not 200 OK", i, w.Code)
    		}
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 5.4K bytes
    - Viewed (0)
Back to top