Debian Codegraph @

common/types/traits/mapper.go

raw symbols SCIP
1 // Copyright 2018 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 package traitsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/
16
17 import "github.com/google/cel-go/common/types/refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/"
18
19 // Mapper interface which aggregates the traits of a maps.
20 type Mapperscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Mapper# interface {
21 refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#
22 Containerscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Container#
23 Indexerscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Indexer#
24 Iterablescip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Iterable#
25 Sizerscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Sizer#
26
27 // Find returns a value, if one exists, for the input key.
28 //
29 // If the key is not found the function returns (nil, false).
30 // If the input key is not valid for the map, or is Err or Unknown the function returns
31 // (Unknown|Err, false).
32 Findscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Mapper#Find.(key refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#) (refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#, bool)
33 }
34
35 // MutableMapper interface which emits an immutable result after an intermediate computation.
36 //
37 // Note, this interface is intended only to be used within Comprehensions where the mutable
38 // value is not directly observable within the user-authored CEL expression.
39 type MutableMapperscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/MutableMapper# interface {
40 Mapperscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Mapper#
41
42 // Insert a key, value pair into the map, returning the map if the insert is successful
43 // and an error if key already exists in the mutable map.
44 Insertscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/MutableMapper#Insert.(k, v refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#) refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#
45
46 // ToImmutableMap converts a mutable map into an immutable map.
47 ToImmutableMapscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/MutableMapper#ToImmutableMap.() Mapperscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Mapper#
48 }