Documentation
¶
Index ¶
Constants ¶
View Source
const ( AgentAutomatic = "automatic" AgentManual = "manual" FromTimeFormat = "2006-01-02T15:04:05" ToTimeFormat = "2006-01-02T15:04:05" )
View Source
const ( MethodAutomatic = "automatic" MethodManual = "manual" SubType = "timeChange" // TODO: Rename Type to "device/timeChange"; remove SubType )
View Source
const (
InfoTimeFormat = "2006-01-02T15:04:05"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Change ¶
type Change struct {
Agent *string `json:"agent,omitempty" bson:"agent,omitempty"`
From *string `json:"from,omitempty" bson:"from,omitempty"`
To *string `json:"to,omitempty" bson:"to,omitempty"`
}
func ParseChange ¶
func ParseChange(parser data.ObjectParser) *Change
func (*Change) Normalize ¶
func (c *Change) Normalize(normalizer data.Normalizer)
func (*Change) Parse ¶
func (c *Change) Parse(parser data.ObjectParser)
type Info ¶ added in v1.29.0
type Info struct {
Time *time.Time `json:"time,omitempty" bson:"time,omitempty"`
TimeZoneName *string `json:"timeZoneName,omitempty" bson:"timeZoneName,omitempty"`
}
func ParseInfo ¶ added in v1.29.0
func ParseInfo(parser data.ObjectParser) *Info
func (*Info) Normalize ¶ added in v1.29.0
func (i *Info) Normalize(normalizer data.Normalizer)
func (*Info) Parse ¶ added in v1.29.0
func (i *Info) Parse(parser data.ObjectParser)
type TimeChange ¶
type TimeChange struct {
dataTypesDevice.Device `bson:",inline"`
From *Info `json:"from,omitempty" bson:"from,omitempty"`
Method *string `json:"method,omitempty" bson:"method,omitempty"`
To *Info `json:"to,omitempty" bson:"to,omitempty"`
Change *Change `json:"change,omitempty" bson:"change,omitempty"` // TODO: DEPRECATED
}
func New ¶
func New() *TimeChange
func (*TimeChange) Normalize ¶ added in v1.24.0
func (t *TimeChange) Normalize(normalizer data.Normalizer)
func (*TimeChange) Parse ¶
func (t *TimeChange) Parse(parser data.ObjectParser) error
func (*TimeChange) Validate ¶
func (t *TimeChange) Validate(validator structure.Validator)
Click to show internal directories.
Click to hide internal directories.