Documentation
¶
Index ¶
- func BoolToNullable(v bool) *bool
- func DurationPbToDuration(d *durationpb.Duration) time.Duration
- func DurationPbToNullableDuration(d *durationpb.Duration) *time.Duration
- func DurationToDurationPb(d time.Duration) *durationpb.Duration
- func Int64ToInt64Value(v int64) *wrapperspb.Int64Value
- func Int64ToNullable(v int64) *int64
- func Int64ValueToInt64(v *wrapperspb.Int64Value) int64
- func NullableBool(v *bool) bool
- func NullableDurationToDurationPb(d *time.Duration) *durationpb.Duration
- func NullableInt64(v *int64) int64
- func NullableString(v *string) string
- func NullableTimeToTimestamp(t *time.Time) *timestamppb.Timestamp
- func RawMessageToStruct(data json.RawMessage) *structpb.Struct
- func StringToNullable(v string) *string
- func StructToRawMessage(s *structpb.Struct) json.RawMessage
- func TimeToTimestamp(t time.Time) *timestamppb.Timestamp
- func TimestampToNullableTime(ts *timestamppb.Timestamp) *time.Time
- func TimestampToTime(ts *timestamppb.Timestamp) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DurationPbToDuration ¶
func DurationPbToDuration(d *durationpb.Duration) time.Duration
DurationPbToDuration converts *durationpb.Duration to time.Duration
func DurationPbToNullableDuration ¶ added in v0.3.0
func DurationPbToNullableDuration(d *durationpb.Duration) *time.Duration
DurationPbToNullableDuration converts *durationpb.Duration to *time.Duration
func DurationToDurationPb ¶
func DurationToDurationPb(d time.Duration) *durationpb.Duration
DurationToDurationPb converts time.Duration to *durationpb.Duration
func Int64ToInt64Value ¶
func Int64ToInt64Value(v int64) *wrapperspb.Int64Value
Int64ToInt64Value converts int64 to *wrapperspb.Int64Value
func Int64ToNullable ¶
Int64ToNullable converts int64 to *int64
func Int64ValueToInt64 ¶
func Int64ValueToInt64(v *wrapperspb.Int64Value) int64
Int64ValueToInt64 converts *wrapperspb.Int64Value to int64
func NullableDurationToDurationPb ¶ added in v0.3.0
func NullableDurationToDurationPb(d *time.Duration) *durationpb.Duration
NullableDurationToDurationPb converts *time.Duration to *durationpb.Duration
func NullableInt64 ¶
NullableInt64 converts *int64 to int64 (for wrappers)
func NullableString ¶
NullableString converts *string to string
func NullableTimeToTimestamp ¶ added in v0.3.0
func NullableTimeToTimestamp(t *time.Time) *timestamppb.Timestamp
NullableTimeToTimestamp converts *time.Time to *timestamppb.Timestamp
func RawMessageToStruct ¶ added in v0.4.6
func RawMessageToStruct(data json.RawMessage) *structpb.Struct
RawMessageToStruct converts json.RawMessage to *structpb.Struct via JSON unmarshaling
func StringToNullable ¶
StringToNullable converts string to *string
func StructToRawMessage ¶ added in v0.4.6
func StructToRawMessage(s *structpb.Struct) json.RawMessage
StructToRawMessage converts *structpb.Struct to json.RawMessage via JSON marshaling
func TimeToTimestamp ¶
func TimeToTimestamp(t time.Time) *timestamppb.Timestamp
TimeToTimestamp converts time.Time to *timestamppb.Timestamp
func TimestampToNullableTime ¶ added in v0.3.0
func TimestampToNullableTime(ts *timestamppb.Timestamp) *time.Time
TimestampToNullableTime converts *timestamppb.Timestamp to *time.Time
func TimestampToTime ¶
func TimestampToTime(ts *timestamppb.Timestamp) time.Time
TimestampToTime converts *timestamppb.Timestamp to time.Time
Types ¶
This section is empty.