Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for NewDecoder (0.19 sec)

  1. internal/config/policy/opa/config.go

    	type opaResult struct {
    		Result bool `json:"result"`
    	}
    
    	respBody := bytes.NewReader(opaRespBytes)
    
    	var result opaResult
    	if err = json.NewDecoder(respBody).Decode(&result); err != nil {
    		respBody.Seek(0, 0)
    		var resultAllow opaResultAllow
    		if err = json.NewDecoder(respBody).Decode(&resultAllow); err != nil {
    			return false, err
    		}
    		return resultAllow.Result.Allow, nil
    	}
    
    	return result.Result, nil
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Sep 14 21:50:16 GMT 2023
    - 5.2K bytes
    - Viewed (1)
  2. internal/config/identity/plugin/config.go

    	o.serviceMetrics.accumRequestRTT(reqStartTime, float64(reqDurNanos)/1e6, true)
    
    	switch resp.StatusCode {
    	case 200:
    		var result AuthNSuccessResponse
    		if err = json.NewDecoder(resp.Body).Decode(&result); err != nil {
    			return AuthNResponse{}, err
    		}
    
    		if result.MaxValiditySeconds < minValidityDurationSeconds || result.MaxValiditySeconds > maxValidityDurationSeconds {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 13.3K bytes
    - Viewed (3)
  3. internal/event/config.go

    }
    
    // ParseConfig - parses data in reader to notification configuration.
    func ParseConfig(reader io.Reader, region string, targetList *TargetList) (*Config, error) {
    	var config Config
    
    	if err := xml.NewDecoder(reader).Decode(&config); err != nil {
    		return nil, err
    	}
    
    	if err := config.Validate(region, targetList); err != nil {
    		return nil, err
    	}
    
    	config.SetRegion(region)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 16 17:28:29 GMT 2021
    - 8.4K bytes
    - Viewed (0)
  4. internal/config/policy/plugin/config.go

    	type opaResult struct {
    		Result bool `json:"result"`
    	}
    
    	respBody := bytes.NewReader(opaRespBytes)
    
    	var result opaResult
    	if err = json.NewDecoder(respBody).Decode(&result); err != nil {
    		respBody.Seek(0, 0)
    		var resultAllow opaResultAllow
    		if err = json.NewDecoder(respBody).Decode(&resultAllow); err != nil {
    			return false, err
    		}
    		return resultAllow.Result.Allow, nil
    	}
    
    	return result.Result, nil
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Sep 14 21:50:16 GMT 2023
    - 5.8K bytes
    - Viewed (0)
Back to top