Documentation
¶
Overview ¶
Package maps contains shared layouts for maps field implementations, for sharing between the tdp packages and the gencode packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoolToBytes ¶
type BoolToBytes struct {
// contains filtered or unexported fields
}
BoolToBytes is a map<bool, bytes>.
func (*BoolToBytes) ProtoReflect ¶
func (m *BoolToBytes) ProtoReflect() protoreflect.Map
ProtoReflect implements Map.
type BoolToMessage ¶
type BoolToMessage[M any] struct { // contains filtered or unexported fields }
BoolToMessage is a map<bool, M> where M is a message type.
M must be dynamic.Message or a type that wraps it.
func (*BoolToMessage[M]) Get ¶
func (m *BoolToMessage[M]) Get(key bool) (*M, bool)
Get implements Map.
func (*BoolToMessage[_]) ProtoReflect ¶
func (m *BoolToMessage[_]) ProtoReflect() protoreflect.Map
ProtoReflect implements Map.
type BoolToScalar ¶
type BoolToScalar[V any] struct { // contains filtered or unexported fields }
BoolToScalar is a map<bool, V> field where V is a scalar type.
func (*BoolToScalar[V]) ProtoReflect ¶
func (m *BoolToScalar[V]) ProtoReflect() protoreflect.Map
ProtoReflect implements Map.
type BoolToString ¶
type BoolToString struct {
// contains filtered or unexported fields
}
BoolToString is a map<bool, string>.
func (*BoolToString) ProtoReflect ¶
func (m *BoolToString) ProtoReflect() protoreflect.Map
ProtoReflect implements Map.
type IntToBytes ¶
type IntToBytes[K Int] struct { // contains filtered or unexported fields }
IntToBytes is a map<K, string> where K is an integer type.
func (*IntToBytes[K]) ProtoReflect ¶
func (m *IntToBytes[K]) ProtoReflect() protoreflect.Map
ProtoReflect implements Map.
type IntToMessage ¶
type IntToMessage[K xprotoreflect.Int, M any] struct { // contains filtered or unexported fields }
IntToMessage is a map<K, M> where K is an integer type and M is a message type.
M must be dynamic.Message or a type that wraps it.
func (*IntToMessage[K, M]) Get ¶
func (m *IntToMessage[K, M]) Get(key K) (*M, bool)
Get implements Map.
func (*IntToMessage[K, _]) ProtoReflect ¶
func (m *IntToMessage[K, _]) ProtoReflect() protoreflect.Map
ProtoReflect implements Map.
func (*IntToMessage[K, M]) Range ¶
func (m *IntToMessage[K, M]) Range(yield func(K, *M) bool)
Range implements Map.
type IntToScalar ¶
IntToScalar is a map<K, V> field where K and V are both scalar types.
func (*IntToScalar[K, V]) Get ¶
func (m *IntToScalar[K, V]) Get(key K) (V, bool)
Get implements Map.
func (*IntToScalar[K, V]) ProtoReflect ¶
func (m *IntToScalar[K, V]) ProtoReflect() protoreflect.Map
ProtoReflect implements Map.
func (*IntToScalar[K, V]) Range ¶
func (m *IntToScalar[K, V]) Range(yield func(K, V) bool)
Range implements Map.
type IntToString ¶
type IntToString[K Int] struct { // contains filtered or unexported fields }
IntToString is a map<K, string> where K is an integer type.
func (*IntToString[K]) ProtoReflect ¶
func (m *IntToString[K]) ProtoReflect() protoreflect.Map
ProtoReflect implements Map.
type Map ¶
type Map[K, V any] interface { // Len returns the number of entries in the map. Len() int // Get looks up an entry in the map. Get(K) (V, bool) // Range is an iterator over the entries in the map; entries are returned // in unspecified order. Range(yield func(K, V) bool) // ProtoReflect returns a reflection view for this value. ProtoReflect() protoreflect.Map // contains filtered or unexported methods }
Map is an interface that all map types in this package conform to.
type StringToBytes ¶
type StringToBytes struct {
// contains filtered or unexported fields
}
StringToBytes is a map<string, bytes>.
func (*StringToBytes) Get ¶
func (m *StringToBytes) Get(key string) ([]byte, bool)
Get implements Map.
func (*StringToBytes) ProtoReflect ¶
func (m *StringToBytes) ProtoReflect() protoreflect.Map
ProtoReflect implements Map.
type StringToMessage ¶
type StringToMessage[M any] struct { // contains filtered or unexported fields }
StringToMessage is a map<string, M> where M is a message type.
M must be dynamic.Message or a type that wraps it.
func (*StringToMessage[M]) Get ¶
func (m *StringToMessage[M]) Get(key string) (*M, bool)
Get implements Map.
func (*StringToMessage[_]) ProtoReflect ¶
func (m *StringToMessage[_]) ProtoReflect() protoreflect.Map
ProtoReflect implements Map.
type StringToScalar ¶
type StringToScalar[V any] struct { // contains filtered or unexported fields }
StringToScalar is a map<string, V> field where V is a scalar type.
func (*StringToScalar[V]) Get ¶
func (m *StringToScalar[V]) Get(key string) (V, bool)
Get implements Map.
func (*StringToScalar[V]) ProtoReflect ¶
func (m *StringToScalar[V]) ProtoReflect() protoreflect.Map
ProtoReflect implements Map.
type StringToString ¶
type StringToString struct {
// contains filtered or unexported fields
}
StringToString is a map<string, string>.
func (*StringToString) Get ¶
func (m *StringToString) Get(key string) (string, bool)
Get implements Map.
func (*StringToString) ProtoReflect ¶
func (m *StringToString) ProtoReflect() protoreflect.Map
ProtoReflect implements Map.