MCPcopy Create free account
hub / github.com/Permify/permify / TypeUrlToString

Function TypeUrlToString

pkg/attribute/attribute.go:181–202  ·  view source on GitHub ↗
(url string)

Source from the content-addressed store, hash-verified

179}
180
181func TypeUrlToString(url string) string {
182 switch url {
183 case "type.googleapis.com/base.v1.StringValue":
184 return "string"
185 case "type.googleapis.com/base.v1.BooleanValue":
186 return "boolean"
187 case "type.googleapis.com/base.v1.IntegerValue":
188 return "integer"
189 case "type.googleapis.com/base.v1.DoubleValue":
190 return "double"
191 case "type.googleapis.com/base.v1.StringArrayValue":
192 return "string[]"
193 case "type.googleapis.com/base.v1.BooleanArrayValue":
194 return "boolean[]"
195 case "type.googleapis.com/base.v1.IntegerArrayValue":
196 return "integer[]"
197 case "type.googleapis.com/base.v1.DoubleArrayValue":
198 return "double[]"
199 default:
200 return ""
201 }
202}
203
204// AnyToString function takes an Any proto message and converts it into a string.
205func AnyToString(any *anypb.Any) string {

Callers 3

ValidateAttributeFunction · 0.92
ToStringFunction · 0.85
attribute_test.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected