Documentation
¶
Overview ¶
Package types provides custom JSON types for Gripmock.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteSize ¶ added in v3.5.0
type ByteSize struct {
Bytes int64
}
ByteSize is an env-decodable size with K|M|G suffix support (decimal kilobytes/mebibytes/gibibytes). Examples: "128K", "64M", "1G", or plain integer bytes like "262144".
func (*ByteSize) UnmarshalText ¶ added in v3.5.0
UnmarshalText implements encoding.TextUnmarshaler for ByteSize.
type Duration ¶
Duration is a custom type alias for time.Duration that provides JSON marshaling/unmarshaling support for string values like "100ms".
func (Duration) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.