package timestamppb
import "github.com/knqyf263/go-plugin/types/known/timestamppb"
Index ¶
- Variables
- type Timestamp
- func New(t time.Time) *Timestamp
- func Now() *Timestamp
- func (x *Timestamp) AsTime() time.Time
- func (x *Timestamp) CheckValid() error
- func (x *Timestamp) GetNanos() int32
- func (x *Timestamp) GetSeconds() int64
- func (x *Timestamp) IsValid() bool
- func (m *Timestamp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Timestamp) MarshalToVT(dAtA []byte) (int, error)
- func (m *Timestamp) MarshalVT() (dAtA []byte, err error)
- func (x *Timestamp) ProtoReflect() protoreflect.Message
- func (m *Timestamp) SizeVT() (n int)
- func (m *Timestamp) UnmarshalVT(dAtA []byte) error
Variables ¶
var ( ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflow = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") )
Types ¶
type Timestamp ¶
type Timestamp struct { // Represents seconds of UTC time since Unix epoch // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to // 9999-12-31T23:59:59Z inclusive. Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` // Non-negative fractions of a second at nanosecond resolution. Negative // second values with fractions must still have non-negative nanos values // that count forward in time. Must be from 0 to 999,999,999 // inclusive. Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` // contains filtered or unexported fields }
func New ¶
New constructs a new Timestamp from the provided time.Time.
func Now ¶
func Now() *Timestamp
Now constructs a new Timestamp from the current time.
func (*Timestamp) AsTime ¶
AsTime converts x to a time.Time.
func (*Timestamp) CheckValid ¶
CheckValid returns an error if the timestamp is invalid. In particular, it checks whether the value represents a date that is in the range of 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. An error is reported for a nil Timestamp.
func (*Timestamp) GetNanos ¶
func (*Timestamp) GetSeconds ¶
func (*Timestamp) IsValid ¶
IsValid reports whether the timestamp is valid. It is equivalent to CheckValid == nil.
func (*Timestamp) MarshalToSizedBufferVT ¶
func (*Timestamp) MarshalToVT ¶
func (*Timestamp) MarshalVT ¶
func (*Timestamp) ProtoReflect ¶
func (x *Timestamp) ProtoReflect() protoreflect.Message
func (*Timestamp) SizeVT ¶
func (*Timestamp) UnmarshalVT ¶
Source Files ¶
timestamp.go timestamp.pb.go timestamp_vtproto.pb.go
- Version
- v0.6.1
- Published
- Mar 17, 2023
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 4 days ago –
Tools for package owners.