Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for keyAsString (0.17 sec)

  1. istioctl/pkg/describe/describe.go

    }
    
    // asMyProtoValue wraps a protobuf Struct so we may use it with keyAsStruct and keyAsString
    func asMyProtoValue(s *structpb.Struct) *myProtoValue {
    	return &myProtoValue{
    		&structpb.Value{
    			Kind: &structpb.Value_StructValue{
    				StructValue: s,
    			},
    		},
    	}
    }
    
    func (v *myProtoValue) keyAsString(key string) string {
    	s := v.keyAsStruct(key)
    	return s.GetStringValue()
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 50.4K bytes
    - Viewed (0)
  2. internal/s3select/sql/jsonpath.go

    	// fmt.Printf("JPATHexpr: %v jsonobj: %v\n\n", p, v)
    	if len(p) == 0 || v == nil {
    		return v, false, nil
    	}
    
    	switch {
    	case p[0].Key != nil:
    		key := p[0].Key.keyString()
    
    		switch kvs := v.(type) {
    		case jstream.KVS:
    			for _, kv := range kvs {
    				if kv.Key == key {
    					return jsonpathEval(p[1:], kv.Value)
    				}
    			}
    			// Key not found - return nil result
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  3. internal/s3select/sql/utils.go

    	return string(*i.Quoted)
    }
    
    func (o *ObjectKey) String() string {
    	if o.Lit != nil {
    		return fmt.Sprintf("['%s']", string(*o.Lit))
    	}
    	return fmt.Sprintf(".%s", o.ID.String())
    }
    
    func (o *ObjectKey) keyString() string {
    	if o.Lit != nil {
    		return string(*o.Lit)
    	}
    	return o.ID.String()
    }
    
    // getLastKeypathComponent checks if the given expression is a path
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Nov 10 16:12:50 GMT 2021
    - 3.6K bytes
    - Viewed (0)
  4. internal/s3select/sql/evaluate.go

    			return nil, err
    		}
    
    		return jsonToValue(result)
    	default:
    		if pathExpr[len(pathExpr)-1].Key == nil {
    			return nil, errInvalidKeypath
    		}
    		return r.Get(pathExpr[len(pathExpr)-1].Key.keyString())
    	}
    }
    
    // jsonToValue will convert the json value to an internal value.
    func jsonToValue(result interface{}) (*Value, error) {
    	switch rval := result.(type) {
    	case string:
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 12K bytes
    - Viewed (0)
Back to top