Documentation ¶
Index ¶
- Constants
- type Rate
- func (d Rate) MarshalJSON() ([]byte, error)
- func (d Rate) MarshalYAML() (interface{}, error)
- func (d *Rate) Set(s string) error
- func (d Rate) String() string
- func (d *Rate) Type() string
- func (d *Rate) UnmarshalJSON(b []byte) error
- func (d *Rate) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
View Source
const ( B Rate = 1 KB = 1024 * B MB = 1024 * KB GB = 1024 * MB )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rate ¶
type Rate int64
Rate wraps int64. It is used to parse the custom rate format from YAML and JSON. This type should not propagate beyond the scope of input/output processing.
func (Rate) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (Rate) MarshalYAML ¶
MarshalYAML implements the yaml.Marshaler interface.
func (*Rate) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
func (*Rate) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.