Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Nanosecond = duration(time.Nanosecond) Microsecond = duration(time.Microsecond) Millisecond = duration(time.Millisecond) Second = duration(time.Second) Minute = duration(time.Minute) Hour = duration(time.Hour) Day = Hour * 24 Week = Day * 7 Fortnight = Week * 2 Month = Day * 30 // Approximation Year = Day * 365 // Approximation Decade = Year * 10 // Approximation Century = Year * 100 // Approximation Millennium = Year * 1000 // Approximation )
Standard unit of time.
Functions ¶
This section is empty.
Types ¶
type ValueBaseTime ¶ added in v1.3.3
type ValueBaseTime struct {
// contains filtered or unexported fields
}
ValueBaseTime is a debefix.ValueCalculator calculate times based on a base time and a duration. In addition to time.Duration, 3 more suffixes are supported: d (days), w (weeks), y (years).
func NewValueBaseTime ¶ added in v1.3.3
func NewValueBaseTime(baseTime time.Time, options ...ValueTimeOption) *ValueBaseTime
func (ValueBaseTime) CalculateValue ¶ added in v1.3.3
type ValueTimeOption ¶ added in v1.3.3
type ValueTimeOption func(*ValueBaseTime)
func WithValueTimeTypeName ¶ added in v1.3.3
func WithValueTimeTypeName(typeName string) ValueTimeOption
type ValueUUID ¶ added in v0.15.0
type ValueUUID struct{}
ValueUUID is a debefix.ValueParser to parse "!uuid" tags to uuid.UUID, a debefix.ResolvedValueParser to to parse "uuid" type to uuid.UUID, and debefix.ValueCalculator to generate new UUID values.
func (ValueUUID) CalculateValue ¶ added in v1.3.2
func (ValueUUID) ParseResolvedValue ¶ added in v0.15.0
Click to show internal directories.
Click to hide internal directories.