Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 21 for RawMessage (0.17 sec)

  1. pilot/pkg/config/kube/crd/conversion_test.go

    	"istio.io/istio/pkg/config/schema/gvk"
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestConvertIstioKind(t *testing.T) {
    	if _, err := ConvertObject(collections.VirtualService, &IstioKind{Spec: json.RawMessage(`{"x":1}`)}, "local"); err != nil {
    		t.Errorf("error for converting object: %s", err)
    	}
    }
    
    func TestConvert(t *testing.T) {
    	cases := []struct {
    		name string
    		cfg  config.Config
    	}{
    		{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 18:26:16 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. cni/pkg/log/uds.go

    		}
    	}
    }
    
    // parseCniLog is tricky because we have known and arbitrary fields in the log, and Go doesn't make that very easy
    func parseCniLog(l string) (cniLog, bool) {
    	var raw map[string]json.RawMessage
    	if err := json.Unmarshal([]byte(l), &raw); err != nil {
    		log.Debugf("Failed to unmarshal CNI plugin log entry: %v", err)
    		return cniLog{}, false
    	}
    	var msg cniLog
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 16:26:28 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  3. pkg/webhooks/validation/server/server.go

    		}
    		return res
    	}
    	return []string{warn.Error()}
    }
    
    func checkFields(raw []byte, kind string, namespace string, name string) (string, error) {
    	trial := make(map[string]json.RawMessage)
    	if err := json.Unmarshal(raw, &trial); err != nil {
    		scope.Infof("cannot decode configuration fields: %v", err)
    		return reasonYamlDecodeError, fmt.Errorf("cannot decode configuration fields: %v", err)
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat May 04 06:13:56 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  4. src/encoding/json/decode_test.go

    	PBool     *bool
    	Map       map[string]string
    	Slice     []string
    	Interface any
    
    	PRaw    *RawMessage
    	PTime   *time.Time
    	PBigInt *big.Int
    	PText   *MustNotUnmarshalText
    	PBuffer *bytes.Buffer // has methods, just not relevant ones
    	PStruct *struct{}
    
    	Raw    RawMessage
    	Time   time.Time
    	BigInt big.Int
    	Text   MustNotUnmarshalText
    	Buffer bytes.Buffer
    	Struct struct{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 16:40:14 UTC 2024
    - 67.6K bytes
    - Viewed (0)
  5. src/encoding/json/bench_test.go

    				for pb.Next() {
    					cachedTypeFields(types[0])
    				}
    			})
    		})
    	}
    }
    
    func BenchmarkEncodeMarshaler(b *testing.B) {
    	b.ReportAllocs()
    
    	m := struct {
    		A int
    		B RawMessage
    	}{}
    
    	b.RunParallel(func(pb *testing.PB) {
    		enc := NewEncoder(io.Discard)
    
    		for pb.Next() {
    			if err := enc.Encode(&m); err != nil {
    				b.Fatalf("Encode error: %v", err)
    			}
    		}
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:00:17 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  6. pkg/config/model.go

    	// Unmarshal from json bytes to go map
    	var data map[string]any
    	err = json.Unmarshal(js, &data)
    	if err != nil {
    		return nil, err
    	}
    
    	return data, nil
    }
    
    func ToRaw(s Spec) (json.RawMessage, error) {
    	js, err := ToJSON(s)
    	if err != nil {
    		return nil, err
    	}
    
    	// Unmarshal from json bytes to go map
    	return js, nil
    }
    
    func ToJSON(s Spec) ([]byte, error) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 15:31:09 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/oidc.go

    	// CEL expressions.
    	// TODO(aramase): In the future when we look into making distributed claims work,
    	// we should see if we can skip this function and use a dynamic type resolver for
    	// both json.RawMessage and the distributed claim fetching.
    	if a.celMapper.Username != nil || a.celMapper.Groups != nil || a.celMapper.UID != nil || a.celMapper.Extra != nil || a.celMapper.ClaimValidationRules != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 19:29:33 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  8. docs/debugging/xl-meta/main.go

    					b = nbuf
    				}
    
    				hdr, v, err := decodeXLHeaders(v)
    				if err != nil {
    					return nil, err
    				}
    				type version struct {
    					Idx      int
    					Header   json.RawMessage
    					Metadata json.RawMessage
    				}
    				versions := make([]version, hdr.versions)
    				headerVer := hdr.headerVer
    				err = decodeVersions(v, hdr.versions, func(idx int, hdr, meta []byte) error {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 31 14:49:23 UTC 2024
    - 38.5K bytes
    - Viewed (0)
  9. cmd/site-replication.go

    						AccessKey:     user,
    						SecretKey:     acc.Credentials.SecretKey,
    						Groups:        acc.Credentials.Groups,
    						Claims:        claims,
    						SessionPolicy: json.RawMessage(policyJSON),
    						Status:        acc.Credentials.Status,
    						Name:          acc.Credentials.Name,
    						Description:   acc.Credentials.Description,
    						Expiration:    &acc.Credentials.Expiration,
    					},
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 184.3K bytes
    - Viewed (0)
  10. cmd/admin-handlers-users.go

    					AccessKey:     user,
    					SecretKey:     acc.Credentials.SecretKey,
    					Groups:        acc.Credentials.Groups,
    					Claims:        claims,
    					SessionPolicy: json.RawMessage(policyJSON),
    					Status:        acc.Credentials.Status,
    					Name:          sa.Name,
    					Description:   sa.Description,
    					Expiration:    &sa.Expiration,
    				}
    			}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 28 17:19:04 UTC 2024
    - 78.6K bytes
    - Viewed (0)
Back to top