Documentation ¶
Index ¶
Constants ¶
View Source
const (
// ModuleName is the prefix given to all the functions in this module.
ModuleName = "datetime"
)
Variables ¶
This section is empty.
Functions ¶
func Format ¶
Format returns returns a textual representation of the input time. The format has to be defined like specified by the golang "time" package. The time is the number of seconds since the epoch, and matches what comes from our Now function. Golang documentation: https://golang.org/pkg/time/#Time.Format
Types ¶
type DateTimeFact ¶
type DateTimeFact struct {
// contains filtered or unexported fields
}
DateTimeFact is a fact which returns the current date and time.
func (*DateTimeFact) Close ¶
func (obj *DateTimeFact) Close() error
Close runs some shutdown code for this fact and turns off the stream.
func (*DateTimeFact) Info ¶
func (obj *DateTimeFact) Info() *facts.Info
Info returns some static info about itself.
func (*DateTimeFact) Init ¶
func (obj *DateTimeFact) Init(init *facts.Init) error
Init runs some startup code for this fact.
func (*DateTimeFact) Stream ¶
func (obj *DateTimeFact) Stream() error
Stream returns the changing values that this fact has over time.
Click to show internal directories.
Click to hide internal directories.