package v1
import "k8s.io/kubernetes/pkg/apis/meta/v1"
Index ¶
- type Time
- func Date(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) Time
- func NewTime(time time.Time) Time
- func Now() Time
- func Unix(sec int64, nsec int64) Time
- func (t Time) Before(u Time) bool
- func (t Time) DeepCopy() Time
- func (t Time) Equal(u Time) bool
- func (t *Time) Fuzz(c fuzz.Continue)
- func (t *Time) IsZero() bool
- func (t Time) MarshalJSON() ([]byte, error)
- func (t Time) MarshalQueryParameter() (string, error)
- func (_ Time) OpenAPIDefinition() openapi.OpenAPIDefinition
- func (t Time) Rfc3339Copy() Time
- func (t Time) String() string
- func (t *Time) UnmarshalJSON(b []byte) error
- func (t *Time) UnmarshalQueryParameter(str string) error
Types ¶
type Time ¶
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
+protobuf.options.marshal=false +protobuf.as=Timestamp +protobuf.options.(gogoproto.goproto_stringer)=false
func Date ¶
Date returns the Time corresponding to the supplied parameters by wrapping time.Date.
func NewTime ¶
NewTime returns a wrapped instance of the provided time
func Now ¶
func Now() Time
Now returns the current local time.
func Unix ¶
Unix returns the local time corresponding to the given Unix time by wrapping time.Unix.
func (Time) Before ¶
Before reports whether the time instant t is before u.
func (Time) DeepCopy ¶
DeepCopy returns a deep-copy of the Time value. The underlying time.Time type is effectively immutable in the time API, so it is safe to copy-by-assign, despite the presence of (unexported) Pointer fields.
func (Time) Equal ¶
Equal reports whether the time instant t is equal to u.
func (*Time) Fuzz ¶
func (t *Time) Fuzz(c fuzz.Continue)
Fuzz satisfies fuzz.Interface.
func (*Time) IsZero ¶
IsZero returns true if the value is nil or time is zero.
func (Time) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (Time) MarshalQueryParameter ¶
MarshalQueryParameter converts to a URL query parameter value
func (Time) OpenAPIDefinition ¶
func (_ Time) OpenAPIDefinition() openapi.OpenAPIDefinition
func (Time) Rfc3339Copy ¶
Rfc3339Copy returns a copy of the Time at second-level precision.
func (Time) String ¶
String returns the representation of the time.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface.
func (*Time) UnmarshalQueryParameter ¶
UnmarshalQueryParameter converts from a URL query parameter value to an object
Source Files ¶
time.go
- Version
- v1.7.8
- Published
- Oct 5, 2017
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 1 minute ago –
Tools for package owners.