timeutil

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package timeutil implements time utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimeFrame

type TimeFrame struct {
	// StartUTC is the time when resource is complete.
	StartUTC time.Time `json:"start-utc" read-only:"true"`
	// StartUTCRFC3339Nano is the timestamp in RFC3339 format with nano-second scale.
	// e.g. "2006-01-02T15:04:05.999999999Z07:00"
	StartUTCRFC3339Nano string `json:"start-utc-rfc3339-nano" read-only:"true"`
	// EndUTC is the time when resource is complete.
	EndUTC time.Time `json:"complete-utc" read-only:"true"`
	// EndUTCRFC3339Nano is the timestamp in RFC3339 format with nano-second scale.
	// e.g. "2006-01-02T15:04:05.999999999Z07:00"
	EndUTCRFC3339Nano string `json:"complete-utc-rfc3339-nano" read-only:"true"`
	// Took is the duration that took to create the resource.
	Took time.Duration `json:"took" read-only:"true"`
	// TookString is the duration that took to create the resource.
	TookString string `json:"took-string" read-only:"true"`
}

TimeFrame records create/delete time frame.

func NewTimeFrame

func NewTimeFrame(start time.Time, end time.Time) TimeFrame

NewTimeFrame returns a new TimeFrame.

Jump to

Keyboard shortcuts

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