time

package
v0.7.23 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_hopeio_time_time_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Date

type Date struct {
	Days int32 `protobuf:"varint,1,opt,name=days,proto3" json:"days,omitempty"`
	// contains filtered or unexported fields
}

func (*Date) Descriptor deprecated

func (*Date) Descriptor() ([]byte, []int)

Deprecated: Use Date.ProtoReflect.Descriptor instead.

func (*Date) GetDays added in v0.1.4

func (x *Date) GetDays() int32

func (*Date) GobDecode

func (x *Date) GobDecode(data []byte) error

func (*Date) GobEncode

func (x *Date) GobEncode() ([]byte, error)

func (*Date) GormDataType

func (x *Date) GormDataType() string

func (*Date) MarshalBinary

func (x *Date) MarshalBinary() ([]byte, error)

func (*Date) MarshalGQL

func (x *Date) MarshalGQL(w io.Writer)

func (*Date) MarshalJSON

func (x *Date) MarshalJSON() ([]byte, error)

func (*Date) MarshalText added in v0.1.4

func (x *Date) MarshalText() ([]byte, error)

func (*Date) ProtoMessage

func (*Date) ProtoMessage()

func (*Date) ProtoReflect

func (x *Date) ProtoReflect() protoreflect.Message

func (*Date) Reset

func (x *Date) Reset()

func (*Date) Scan

func (x *Date) Scan(value interface{}) error

func (*Date) String

func (x *Date) String() string

func (*Date) Time

func (x *Date) Time() time.Time

func (*Date) UnmarshalBinary

func (x *Date) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.

func (*Date) UnmarshalGQL

func (x *Date) UnmarshalGQL(v interface{}) error

func (*Date) UnmarshalJSON

func (x *Date) UnmarshalJSON(data []byte) error

func (*Date) UnmarshalText added in v0.1.4

func (x *Date) UnmarshalText(data []byte) error

func (*Date) Value

func (x *Date) Value() (driver.Value, error)

type Duration

type Duration struct {
	Micro int64 `protobuf:"varint,1,opt,name=micro,proto3" json:"micro,omitempty"`
	// contains filtered or unexported fields
}

func (*Duration) AsDuration added in v0.7.1

func (x *Duration) AsDuration() time.Duration

AsDuration converts x to a time.Duration, returning the closest duration value in the event of overflow.

func (*Duration) CheckValid added in v0.7.1

func (x *Duration) CheckValid() error

CheckValid returns an error if the duration is invalid. In particular, it checks whether the value is within the range of -10000 years to +10000 years inclusive. An error is reported for a nil Duration.

func (*Duration) Descriptor deprecated

func (*Duration) Descriptor() ([]byte, []int)

Deprecated: Use Duration.ProtoReflect.Descriptor instead.

func (*Duration) GetMicro added in v0.7.1

func (x *Duration) GetMicro() int64

func (*Duration) IsValid added in v0.7.1

func (x *Duration) IsValid() bool

IsValid reports whether the duration is valid. It is equivalent to CheckValid == nil.

func (Duration) MarshalJSON added in v0.7.1

func (t Duration) MarshalJSON() ([]byte, error)

func (*Duration) ProtoMessage

func (*Duration) ProtoMessage()

func (*Duration) ProtoReflect

func (x *Duration) ProtoReflect() protoreflect.Message

func (*Duration) Reset

func (x *Duration) Reset()

func (*Duration) String

func (x *Duration) String() string

func (*Duration) UnmarshalJSON added in v0.7.1

func (t *Duration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the encoding/json.Unmarshaler interface. The time must be a quoted string in the RFC 3339 format.

type Timestamp

type Timestamp struct {
	Millis int64 `protobuf:"varint,1,opt,name=millis,proto3" json:"millis,omitempty"`
	// contains filtered or unexported fields
}

func Now

func Now() Timestamp

func (*Timestamp) Descriptor deprecated

func (*Timestamp) Descriptor() ([]byte, []int)

Deprecated: Use Timestamp.ProtoReflect.Descriptor instead.

func (*Timestamp) GetMillis

func (x *Timestamp) GetMillis() int64

func (*Timestamp) GobDecode

func (ts *Timestamp) GobDecode(data []byte) error

func (*Timestamp) GobEncode

func (ts *Timestamp) GobEncode() ([]byte, error)

func (*Timestamp) GormDataType

func (ts *Timestamp) GormDataType() string

func (*Timestamp) MarshalBinary

func (ts *Timestamp) MarshalBinary() ([]byte, error)

func (*Timestamp) MarshalJSON

func (ts *Timestamp) MarshalJSON() ([]byte, error)

func (*Timestamp) ProtoMessage

func (*Timestamp) ProtoMessage()

func (*Timestamp) ProtoReflect

func (x *Timestamp) ProtoReflect() protoreflect.Message

func (*Timestamp) Reset

func (x *Timestamp) Reset()

func (*Timestamp) Scan

func (ts *Timestamp) Scan(value interface{}) (err error)

func (*Timestamp) String

func (x *Timestamp) String() string

func (*Timestamp) Time

func (ts *Timestamp) Time() time.Time

func (*Timestamp) UnmarshalBinary

func (ts *Timestamp) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.

func (*Timestamp) UnmarshalJSON

func (ts *Timestamp) UnmarshalJSON(data []byte) error

func (*Timestamp) Value

func (ts *Timestamp) Value() (driver.Value, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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