Documentation ¶
Index ¶
- func Contains(s []string, e string) bool
- func CopyMap(o map[string]string) (r map[string]string)
- func MakeBinaryLiteral(v []byte) *core.Literal
- func MakeDefaultLiteralForType(typ *core.LiteralType) (*core.Literal, error)
- func MakeGenericLiteral(v *structpb.Struct) *core.Literal
- func MakeLiteral(v interface{}) (*core.Literal, error)
- func MakeLiteralForBlob(path storage.DataReference, isDir bool, format string) *core.Literal
- func MakeLiteralForCollection(v []interface{}) (*core.Literal, error)
- func MakeLiteralForMap(v map[string]interface{}) (*core.Literal, error)
- func MakeLiteralForSimpleType(t core.SimpleType, s string) (*core.Literal, error)
- func MakeLiteralMap(v map[string]interface{}) (*core.LiteralMap, error)
- func MakePrimitive(v interface{}) (*core.Primitive, error)
- func MakePrimitiveForType(t core.SimpleType, s string) (*core.Primitive, error)
- func MakePrimitiveLiteral(v interface{}) (*core.Literal, error)
- func MarshalObjToStruct(input interface{}) (*structpb.Struct, error)
- func MarshalStruct(in proto.Message, out *structpb.Struct) error
- func MarshalToString(msg proto.Message) (string, error)
- func MustMakeDefaultLiteralForType(typ *core.LiteralType) *core.Literal
- func MustMakeLiteral(v interface{}) *core.Literal
- func MustMakePrimitive(v interface{}) *core.Primitive
- func MustMakePrimitiveLiteral(v interface{}) *core.Literal
- func UnionMaps(maps ...map[string]string) map[string]string
- func UnmarshalStruct(structObj *structpb.Struct, msg proto.Message) error
- func UnmarshalStructToObj(structObj *structpb.Struct, obj interface{}) error
- type ErrorCollection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeBinaryLiteral ¶ added in v0.5.29
func MakeDefaultLiteralForType ¶ added in v0.5.29
func MakeDefaultLiteralForType(typ *core.LiteralType) (*core.Literal, error)
func MakeGenericLiteral ¶ added in v0.5.29
func MakeLiteral ¶ added in v0.5.29
func MakeLiteralForBlob ¶ added in v0.5.29
func MakeLiteralForCollection ¶ added in v0.5.29
func MakeLiteralForMap ¶ added in v0.5.29
func MakeLiteralForSimpleType ¶ added in v0.5.29
func MakeLiteralMap ¶ added in v0.5.29
func MakeLiteralMap(v map[string]interface{}) (*core.LiteralMap, error)
func MakePrimitive ¶ added in v0.5.29
func MakePrimitiveForType ¶ added in v0.5.29
func MakePrimitiveLiteral ¶ added in v0.5.29
func MarshalObjToStruct ¶
TODO: Use the stdlib version in the future, or move there if not there. Don't use this if input is a proto Message.
func MustMakeDefaultLiteralForType ¶ added in v0.5.29
func MustMakeDefaultLiteralForType(typ *core.LiteralType) *core.Literal
func MustMakeLiteral ¶ added in v0.5.29
func MustMakePrimitive ¶ added in v0.5.29
func MustMakePrimitiveLiteral ¶ added in v0.5.29
func UnionMaps ¶
This function unions a list of maps (each can be nil or populated) by allocating a new map. Conflicting keys will always defer to the later input map's corresponding value.
func UnmarshalStructToObj ¶ added in v0.5.33
Don't use this if the unmarshalled obj is a proto message.
Types ¶
type ErrorCollection ¶ added in v0.5.29
type ErrorCollection struct {
Errors []error
}
func (ErrorCollection) Error ¶ added in v0.5.29
func (e ErrorCollection) Error() string
Click to show internal directories.
Click to hide internal directories.