kratos: Index | Files

package time

import ""


Package Files


type Duration Uses

type Duration xtime.Duration

Duration be used toml unmarshal string time, like 1s, 500ms.

func (Duration) Shrink Uses

func (d Duration) Shrink(c context.Context) (Duration, context.Context, context.CancelFunc)

Shrink will decrease the duration by comparing with context's timeout duration and return new timeout\context\CancelFunc.

func (*Duration) UnmarshalText Uses

func (d *Duration) UnmarshalText(text []byte) error

UnmarshalText unmarshal text to duration.

type Time Uses

type Time int64

Time be used to MySql timestamp converting.

func (*Time) Scan Uses

func (jt *Time) Scan(src interface{}) (err error)

Scan scan time.

func (Time) Time Uses

func (jt Time) Time() xtime.Time

Time get time.

func (Time) Value Uses

func (jt Time) Value() (driver.Value, error)

Value get time value.

Package time imports 4 packages (graph) and is imported by 26 packages. Updated 2020-03-29. Refresh now. Tools for package owners.