Documentation ¶
Overview ¶
Package protowrap provides functions of converting and helpers for wrapperspb types.
Index ¶
- func Bool(v *wrapperspb.BoolValue) *bool
- func BoolValue(v *bool) *wrapperspb.BoolValue
- func DoubleValue[T constraints.Float](v *T) *wrapperspb.DoubleValue
- func FloatF32V[T constraints.Float](v *wrapperspb.FloatValue) *T
- func FloatF64V[T constraints.Float](v *wrapperspb.DoubleValue) *T
- func FloatValue[T constraints.Float](v *T) *wrapperspb.FloatValue
- func Int32Value[T constraints.Integer](v *T) *wrapperspb.Int32Value
- func Int64Value[T constraints.Integer](v *T) *wrapperspb.Int64Value
- func IntF32V[T constraints.Integer](v *wrapperspb.Int32Value) *T
- func IntF64V[T constraints.Integer](v *wrapperspb.Int64Value) *T
- func Ints[OUT constraints.Integer, IN constraints.Integer](v []IN) []OUT
- func String(v *wrapperspb.StringValue) *string
- func StringValue(v *string) *wrapperspb.StringValue
- func Time(v *timestamppb.Timestamp) *time.Time
- func Timestamp(v *time.Time) *timestamppb.Timestamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolValue ¶
func BoolValue(v *bool) *wrapperspb.BoolValue
BoolValue returns *wrapperspb.BoolValue from *bool.
func DoubleValue ¶
func DoubleValue[T constraints.Float](v *T) *wrapperspb.DoubleValue
DoubleValue returns *wrapperspb.DoubleValue from *float.
func FloatF32V ¶
func FloatF32V[T constraints.Float](v *wrapperspb.FloatValue) *T
FloatF32V returns *float from *wrapperspb.FloatValue.
func FloatF64V ¶
func FloatF64V[T constraints.Float](v *wrapperspb.DoubleValue) *T
FloatF64V returns *float from *wrapperspb.DoubleValue.
func FloatValue ¶
func FloatValue[T constraints.Float](v *T) *wrapperspb.FloatValue
FloatValue returns *wrapperspb.FloatValue from *float.
func Int32Value ¶
func Int32Value[T constraints.Integer](v *T) *wrapperspb.Int32Value
Int32Value returns *wrapperspb.Int32Value from *int.
func Int64Value ¶
func Int64Value[T constraints.Integer](v *T) *wrapperspb.Int64Value
Int64Value returns *wrapperspb.Int64Value from *int.
func IntF32V ¶
func IntF32V[T constraints.Integer](v *wrapperspb.Int32Value) *T
IntF32V returns *int from *wrapperspb.Int32Value.
func IntF64V ¶
func IntF64V[T constraints.Integer](v *wrapperspb.Int64Value) *T
IntF64V returns *int from *wrapperspb.Int64Value.
func Ints ¶
func Ints[OUT constraints.Integer, IN constraints.Integer](v []IN) []OUT
Ints returns slice of a new type.
func String ¶
func String(v *wrapperspb.StringValue) *string
String returns *string from *wrapperspb.StringValue.
func StringValue ¶
func StringValue(v *string) *wrapperspb.StringValue
StringValue returns *wrapperspb.StringValue from *string.
Types ¶
This section is empty.