proto_utils

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MPL-2.0 Imports: 6 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 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 RatToWrapper

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

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 WrapperToDuration

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

func WrapperToInt

func WrapperToInt(value *wrapperspb.Int32Value) *int

func WrapperToObjectId

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

func WrapperToRat

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

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