timechange

package
v1.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2020 License: BSD-2-Clause Imports: 6 Imported by: 1

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

func Agents added in v1.24.0

func Agents() []string

func Methods added in v1.29.0

func Methods() []string

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 NewChange

func NewChange() *Change

func ParseChange

func ParseChange(parser structure.ObjectParser) *Change

func (*Change) Normalize

func (c *Change) Normalize(normalizer data.Normalizer)

func (*Change) Parse

func (c *Change) Parse(parser structure.ObjectParser)

func (*Change) Validate

func (c *Change) Validate(validator structure.Validator)

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 NewInfo added in v1.29.0

func NewInfo() *Info

func ParseInfo added in v1.29.0

func ParseInfo(parser structure.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 structure.ObjectParser)

func (*Info) Validate added in v1.29.0

func (i *Info) Validate(validator structure.Validator)

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 structure.ObjectParser)

func (*TimeChange) Validate

func (t *TimeChange) Validate(validator structure.Validator)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL