proto_utils

package module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolFromWrapper

func BoolFromWrapper(value *wrapperspb.BoolValue) *bool

func DecimalToString added in v1.0.5

func DecimalToString(v *decimal.Decimal) (string, error)

func DecimalToWrapper added in v1.0.5

func DecimalToWrapper(v *decimal.Decimal) []byte

func DurationToWrapper

func DurationToWrapper(value *time.Duration) *durationpb.Duration

func Int32FromWrapper

func Int32FromWrapper(value *wrapperspb.Int32Value) *int32

func Int32ToWrapper

func Int32ToWrapper(value *int32) *wrapperspb.Int32Value

func MapArray

func MapArray[G any, E any](items []E, mapItem func(E) G) []G

func RatToString added in v1.0.3

func RatToString(v *big.Rat) string

func RatToWrapper

func RatToWrapper(v *big.Rat) []byte

func StringToDecimal added in v1.0.5

func StringToDecimal(v string) (*decimal.Decimal, error)

func StringToRat added in v1.0.3

func StringToRat(v string) (*big.Rat, error)

func StringToWrapper

func StringToWrapper(value *string) *wrapperspb.StringValue

func TimeToWrapper

func TimeToWrapper(value *time.Time) *timestamppb.Timestamp

func ToObjectId

func ToObjectId(value string) primitive.ObjectID

func WrapperToDecimal added in v1.0.5

func WrapperToDecimal(value []byte) *decimal.Decimal

func WrapperToDuration

func WrapperToDuration(value *durationpb.Duration) *time.Duration

func WrapperToInt

func WrapperToInt(value *wrapperspb.Int32Value) *int

func WrapperToInt32 added in v1.0.2

func WrapperToInt32(value *wrapperspb.Int32Value) *int32

func WrapperToObjectId

func WrapperToObjectId(value *wrapperspb.StringValue) (*primitive.ObjectID, error)

func WrapperToRat

func WrapperToRat(value []byte) *big.Rat

func WrapperToString added in v1.0.1

func WrapperToString(value *wrapperspb.StringValue) *string

func WrapperToTime

func WrapperToTime(value *timestamppb.Timestamp) *time.Time

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL