kubernetes/vendor/github.com/google/cel-go/common/types/map.go

// NewDynamicMap returns a traits.Mapper value with dynamic key, value pairs.
func NewDynamicMap(adapter Adapter, value any) traits.Mapper {}

// NewJSONStruct creates a traits.Mapper implementation backed by a JSON struct that has been
// encoded in protocol buffer form.
//
// The `adapter` argument provides type adaptation capabilities from proto to CEL.
func NewJSONStruct(adapter Adapter, value *structpb.Struct) traits.Mapper {}

// NewRefValMap returns a specialized traits.Mapper with CEL valued keys and values.
func NewRefValMap(adapter Adapter, value map[ref.Val]ref.Val) traits.Mapper {}

// NewStringInterfaceMap returns a specialized traits.Mapper with string keys and interface values.
func NewStringInterfaceMap(adapter Adapter, value map[string]any) traits.Mapper {}

// NewStringStringMap returns a specialized traits.Mapper with string keys and values.
func NewStringStringMap(adapter Adapter, value map[string]string) traits.Mapper {}

// NewProtoMap returns a specialized traits.Mapper for handling protobuf map values.
func NewProtoMap(adapter Adapter, value *pb.Map) traits.Mapper {}

type mapAccessor

type baseMap

// Contains implements the traits.Container interface method.
func (m *baseMap) Contains(index ref.Val) ref.Val {}

// ConvertToNative implements the ref.Val interface method.
func (m *baseMap) ConvertToNative(typeDesc reflect.Type) (any, error) {}

// ConvertToType implements the ref.Val interface method.
func (m *baseMap) ConvertToType(typeVal ref.Type) ref.Val {}

// Equal implements the ref.Val interface method.
func (m *baseMap) Equal(other ref.Val) ref.Val {}

// Get implements the traits.Indexer interface method.
func (m *baseMap) Get(key ref.Val) ref.Val {}

// IsZeroValue returns true if the map is empty.
func (m *baseMap) IsZeroValue() bool {}

// Size implements the traits.Sizer interface method.
func (m *baseMap) Size() ref.Val {}

// String converts the map into a human-readable string.
func (m *baseMap) String() string {}

// Type implements the ref.Val interface method.
func (m *baseMap) Type() ref.Type {}

// Value implements the ref.Val interface method.
func (m *baseMap) Value() any {}

func newJSONStructAccessor(adapter Adapter, st map[string]*structpb.Value) mapAccessor {}

type jsonStructAccessor

// Find searches the json struct field map for the input key value and returns (value, true) if
// found.
//
// If the key is not found the function returns (nil, false).
func (a *jsonStructAccessor) Find(key ref.Val) (ref.Val, bool) {}

// Iterator creates a new traits.Iterator from the set of JSON struct field names.
func (a *jsonStructAccessor) Iterator() traits.Iterator {}

func newReflectMapAccessor(adapter Adapter, value reflect.Value) mapAccessor {}

type reflectMapAccessor

// Find converts the input key to a native Golang type and then uses reflection to find the key,
// returning (value, true) if present.
//
// If the key is not found the function returns (nil, false).
func (m *reflectMapAccessor) Find(key ref.Val) (ref.Val, bool) {}

// findInternal attempts to convert the incoming key to the map's internal native type
// and then returns the value, if found.
func (m *reflectMapAccessor) findInternal(key ref.Val) (ref.Val, bool) {}

// Iterator creates a Golang reflection based traits.Iterator.
func (m *reflectMapAccessor) Iterator() traits.Iterator {}

func newRefValMapAccessor(mapVal map[ref.Val]ref.Val) mapAccessor {}

type refValMapAccessor

// Find uses native map accesses to find the key, returning (value, true) if present.
//
// If the key is not found the function returns (nil, false).
func (a *refValMapAccessor) Find(key ref.Val) (ref.Val, bool) {}

// Iterator produces a new traits.Iterator which iterates over the map keys via Golang reflection.
func (a *refValMapAccessor) Iterator() traits.Iterator {}

func newStringMapAccessor(strMap map[string]string) mapAccessor {}

type stringMapAccessor

// Find uses native map accesses to find the key, returning (value, true) if present.
//
// If the key is not found the function returns (nil, false).
func (a *stringMapAccessor) Find(key ref.Val) (ref.Val, bool) {}

// Iterator creates a new traits.Iterator from the string key set of the map.
func (a *stringMapAccessor) Iterator() traits.Iterator {}

func newStringIfaceMapAccessor(adapter Adapter, mapVal map[string]any) mapAccessor {}

type stringIfaceMapAccessor

// Find uses native map accesses to find the key, returning (value, true) if present.
//
// If the key is not found the function returns (nil, false).
func (a *stringIfaceMapAccessor) Find(key ref.Val) (ref.Val, bool) {}

// Iterator creates a new traits.Iterator from the string key set of the map.
func (a *stringIfaceMapAccessor) Iterator() traits.Iterator {}

type protoMap

// Contains returns whether the map contains the given key.
func (m *protoMap) Contains(key ref.Val) ref.Val {}

// ConvertToNative implements the ref.Val interface method.
//
// Note, assignment to Golang struct types is not yet supported.
func (m *protoMap) ConvertToNative(typeDesc reflect.Type) (any, error) {}

// ConvertToType implements the ref.Val interface method.
func (m *protoMap) ConvertToType(typeVal ref.Type) ref.Val {}

// Equal implements the ref.Val interface method.
func (m *protoMap) Equal(other ref.Val) ref.Val {}

// Find returns whether the protoreflect.Map contains the input key.
//
// If the key is not found the function returns (nil, false).
func (m *protoMap) Find(key ref.Val) (ref.Val, bool) {}

// findInternal attempts to convert the incoming key to the map's internal native type
// and then returns the value, if found.
func (m *protoMap) findInternal(key ref.Val) (ref.Val, bool) {}

// Get implements the traits.Indexer interface method.
func (m *protoMap) Get(key ref.Val) ref.Val {}

// IsZeroValue returns true if the map is empty.
func (m *protoMap) IsZeroValue() bool {}

// Iterator implements the traits.Iterable interface method.
func (m *protoMap) Iterator() traits.Iterator {}

// Size returns the number of entries in the protoreflect.Map.
func (m *protoMap) Size() ref.Val {}

// Type implements the ref.Val interface method.
func (m *protoMap) Type() ref.Type {}

// Value implements the ref.Val interface method.
func (m *protoMap) Value() any {}

type mapIterator

// HasNext implements the traits.Iterator interface method.
func (it *mapIterator) HasNext() ref.Val {}

// Next implements the traits.Iterator interface method.
func (it *mapIterator) Next() ref.Val {}

type protoMapIterator

// HasNext implements the traits.Iterator interface method.
func (it *protoMapIterator) HasNext() ref.Val {}

// Next implements the traits.Iterator interface method.
func (it *protoMapIterator) Next() ref.Val {}

type stringKeyIterator

// HasNext implements the traits.Iterator interface method.
func (it *stringKeyIterator) HasNext() ref.Val {}

// Next implements the traits.Iterator interface method.
func (it *stringKeyIterator) Next() ref.Val {}