nulldate

package
v0.0.0-...-0542bea Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_nulldate_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type NullDate

type NullDate struct {
	Date string `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"`
	// is set to true if the date is null
	IsNotNull bool `protobuf:"varint,2,opt,name=is_not_null,json=isNotNull,proto3" json:"is_not_null,omitempty"`
	// contains filtered or unexported fields
}

NullDate ...

func (*NullDate) Descriptor deprecated

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

Deprecated: Use NullDate.ProtoReflect.Descriptor instead.

func (*NullDate) GetDate

func (x *NullDate) GetDate() string

func (*NullDate) GetIsNotNull

func (x *NullDate) GetIsNotNull() bool

func (*NullDate) ImplementsGraphQLType

func (dt *NullDate) 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 (*NullDate) IsNull

func (dt *NullDate) IsNull() bool

IsNull will return if the current timestamp is null

func (NullDate) MarshalJSON

func (dt NullDate) MarshalJSON() ([]byte, error)

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

func (*NullDate) ProtoMessage

func (*NullDate) ProtoMessage()

func (*NullDate) ProtoReflect

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

func (*NullDate) Reset

func (x *NullDate) Reset()

func (*NullDate) Scan

func (dt *NullDate) Scan(value interface{}) error

Scan implements the Scanner interface of the database driver

func (*NullDate) Set

func (dt *NullDate) Set(value string)

Set will set the date to the given time

func (*NullDate) SetNull

func (dt *NullDate) SetNull()

SetNull will clear the date

func (*NullDate) String

func (x *NullDate) String() string

func (*NullDate) Time

func (dt *NullDate) Time() time.Time

Time returns a golang time object of the date

func (*NullDate) UnmarshalGraphQL

func (dt *NullDate) UnmarshalGraphQL(input interface{}) error

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

func (*NullDate) UnmarshalJSON

func (dt *NullDate) UnmarshalJSON(input []byte) error

UnmarshalJSON is used to convert the json representation into a null date

func (*NullDate) Value

func (dt *NullDate) Value() (driver.Value, error)

Value implements the db driver Valuer interface

Jump to

Keyboard shortcuts

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