plgdtime

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ResourceType = "x.plgd.dev.time"
	ResourceURI  = "/x.plgd.dev/time"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PlgdTime

type PlgdTime struct {
	Interfaces     []string `json:"if,omitempty"`
	ResourceTypes  []string `json:"rt,omitempty"`
	Time           string   `json:"time"`                     // time in RFC3339Nano format
	LastSyncedTime string   `json:"lastSyncedTime,omitempty"` // time in RFC3339Nano format
	Status         Status   `json:"status,omitempty"`         // status of the time synchronization
}

func (PlgdTime) GetLastSyncedTime

func (t PlgdTime) GetLastSyncedTime() (time.Time, error)

func (PlgdTime) GetTime

func (t PlgdTime) GetTime() (time.Time, error)

type PlgdTimeUpdate

type PlgdTimeUpdate struct {
	Time string `json:"time"` // time in RFC3339Nano format
}

type Status

type Status string
const (
	StatusSyncing           Status = "syncing"
	StatusInSync            Status = "in-sync"
	StatusInSyncFromStorage Status = "in-sync-from-storage"
)

Jump to

Keyboard shortcuts

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