timestamp

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Timestamp

type Timestamp struct {
	// Represents seconds of UTC time since Unix epoch
	// 1970-01-01T00:00:00Z
	Milliseconds int64 `protobuf:"varint,1,opt,name=milliseconds,proto3" json:"milliseconds,omitempty"`
	// is set to true if the timestamp is null
	IsNotNull            bool     `protobuf:"varint,2,opt,name=is_not_null,json=isNotNull,proto3" json:"is_not_null,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Timestamp ...

func (*Timestamp) Descriptor

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

func (*Timestamp) GetIsNotNull

func (m *Timestamp) GetIsNotNull() bool

func (*Timestamp) GetMilliseconds

func (m *Timestamp) GetMilliseconds() int64

func (*Timestamp) ImplementsGraphQLType

func (ts *Timestamp) ImplementsGraphQLType(name string) bool

ImplementsGraphQLType is required by the graphql custom scalar interface this defines the name used in the schema to declare a null time type

func (*Timestamp) IsNull

func (ts *Timestamp) IsNull() bool

IsNull will return if the current timestamp is null

func (Timestamp) MarshalJSON

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

MarshalJSON will return the content as json value, this is also called by graphql to generate the response

func (*Timestamp) MarshalJSONPB

func (ts *Timestamp) MarshalJSONPB(_ *jsonpb.Marshaler) ([]byte, error)

func (*Timestamp) ProtoMessage

func (*Timestamp) ProtoMessage()

func (*Timestamp) Reset

func (m *Timestamp) Reset()

func (*Timestamp) Scan

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

Scan implements the Scanner interface of the database driver

func (*Timestamp) Set

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

Set will set the timestamp to the given time

func (*Timestamp) SetNull

func (ts *Timestamp) SetNull()

SetNull will clear the timestamp

func (*Timestamp) String

func (m *Timestamp) String() string

func (*Timestamp) Time

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

Time returns a golang time object

func (*Timestamp) UnmarshalGraphQL

func (ts *Timestamp) UnmarshalGraphQL(input interface{}) error

UnmarshalGraphQL is required by the graphql custom scalar interface this wraps the null time

func (*Timestamp) UnmarshalJSON

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

UnmarshalJSON is used to convert the json representation into a timestamp

func (*Timestamp) UnmarshalJSONPB

func (ts *Timestamp) UnmarshalJSONPB(_ *jsonpb.Unmarshaler, input []byte) error

func (Timestamp) Value

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

Value implements the db driver Valuer interface

func (*Timestamp) XXX_DiscardUnknown

func (m *Timestamp) XXX_DiscardUnknown()

func (*Timestamp) XXX_Marshal

func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Timestamp) XXX_Merge

func (m *Timestamp) XXX_Merge(src proto.Message)

func (*Timestamp) XXX_Size

func (m *Timestamp) XXX_Size() int

func (*Timestamp) XXX_Unmarshal

func (m *Timestamp) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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