tsoffset_v1

package
v0.0.0-...-1e276a6 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_gommerce_types_v1_tsoffset_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type TimestampOffset

type TimestampOffset struct {

	// Seconds is the number of seconds since the Unix epoch.
	Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
	// Nanos is the number of nanoseconds offset within the second.
	Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
	// Offset is the offset in seconds from UTC.
	Offset int32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

TimestampOffset is a timestamp with an offset in seconds and nanoseconds.

func New

func New(t time.Time) *TimestampOffset

func Now

func Now() *TimestampOffset

func (*TimestampOffset) AsTime

func (t *TimestampOffset) AsTime() time.Time

func (*TimestampOffset) Descriptor deprecated

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

Deprecated: Use TimestampOffset.ProtoReflect.Descriptor instead.

func (*TimestampOffset) GetNanos

func (x *TimestampOffset) GetNanos() int32

func (*TimestampOffset) GetOffset

func (x *TimestampOffset) GetOffset() int32

func (*TimestampOffset) GetSeconds

func (x *TimestampOffset) GetSeconds() int64

func (*TimestampOffset) Local

func (t *TimestampOffset) Local() *TimestampOffset

func (*TimestampOffset) ProtoMessage

func (*TimestampOffset) ProtoMessage()

func (*TimestampOffset) ProtoReflect

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

func (*TimestampOffset) Reset

func (x *TimestampOffset) Reset()

func (*TimestampOffset) String

func (x *TimestampOffset) String() string

func (*TimestampOffset) UTC

func (t *TimestampOffset) UTC() *TimestampOffset

func (*TimestampOffset) Validate

func (m *TimestampOffset) Validate() error

Validate checks the field values on TimestampOffset with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*TimestampOffset) ValidateAll

func (m *TimestampOffset) ValidateAll() error

ValidateAll checks the field values on TimestampOffset with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TimestampOffsetMultiError, or nil if none found.

type TimestampOffsetMultiError

type TimestampOffsetMultiError []error

TimestampOffsetMultiError is an error wrapping multiple validation errors returned by TimestampOffset.ValidateAll() if the designated constraints aren't met.

func (TimestampOffsetMultiError) AllErrors

func (m TimestampOffsetMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TimestampOffsetMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type TimestampOffsetValidationError

type TimestampOffsetValidationError struct {
	// contains filtered or unexported fields
}

TimestampOffsetValidationError is the validation error returned by TimestampOffset.Validate if the designated constraints aren't met.

func (TimestampOffsetValidationError) Cause

Cause function returns cause value.

func (TimestampOffsetValidationError) Error

Error satisfies the builtin error interface

func (TimestampOffsetValidationError) ErrorName

func (e TimestampOffsetValidationError) ErrorName() string

ErrorName returns error name.

func (TimestampOffsetValidationError) Field

Field function returns field value.

func (TimestampOffsetValidationError) Key

Key function returns key value.

func (TimestampOffsetValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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