types

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalDuration

func MarshalDuration(d time.Duration) graphql.Marshaler

MarshalDuration redecalre the marshalel of standart scalar type Duration

func MarshalID64

func MarshalID64(id uint64) graphql.Marshaler

MarshalID64 redecalre the marshalel of standart scalar type uint64 as ID64

func MarshalTime

func MarshalTime(t time.Time) graphql.Marshaler

MarshalTime redecalre the marshalel of standart scalar type Time

func MarshalUUID

func MarshalUUID(uid uuid.UUID) graphql.Marshaler

MarshalUUID redecalre the marshalel of standart scalar type UUID

func UnmarshalDuration

func UnmarshalDuration(v any) (time.Duration, error)

UnmarshalDuration redecalre the unmarshalel of standart scalar type Duration

func UnmarshalID64

func UnmarshalID64(v any) (uint64, error)

UnmarshalID64 redecalre the unmarshalel of standart scalar type uint64 as ID64

func UnmarshalTime

func UnmarshalTime(v any) (time.Time, error)

UnmarshalTime redecalre the unmarshalel of standart scalar type Time

func UnmarshalUUID

func UnmarshalUUID(v any) (uuid.UUID, error)

UnmarshalUUID redecalre the unmarshalel of standart scalar type UUID

Types

type DateTime

type DateTime time.Time

DateTime implements IO custom type of time with custom format

func DateTimeFromPtr

func DateTimeFromPtr(tm *time.Time) DateTime

DateTimeFromPtr returns DateTime object from pointer

func (DateTime) GetTime

func (t DateTime) GetTime() time.Time

GetTime object from DateTime

func (DateTime) MarshalGQL

func (t DateTime) MarshalGQL(w io.Writer)

MarshalGQL implements method of interface graphql.Marshaler

func (*DateTime) SetTime

func (t *DateTime) SetTime(tm time.Time)

SetTime from time object

func (*DateTime) UnmarshalGQL

func (t *DateTime) UnmarshalGQL(v any) error

UnmarshalGQL implements method of interface graphql.Unmarshaler

type JSON

type JSON gosql.JSON[any]

JSON implements IO custom type of JSON

func JSONFrom

func JSONFrom(v any) (*JSON, error)

func MustJSONFrom

func MustJSONFrom(v any) *JSON

func (JSON) MarshalGQL

func (j JSON) MarshalGQL(w io.Writer)

MarshalGQL implements method of interface graphql.Marshaler

func (*JSON) SetValue

func (j *JSON) SetValue(v any) error

SetValue from any object

func (*JSON) UnmarshalGQL

func (j *JSON) UnmarshalGQL(v any) error

UnmarshalGQL implements method of interface graphql.Unmarshaler

func (JSON) Value

func (j JSON) Value() any

Value object

type NullableJSON

type NullableJSON gosql.NullableJSON[any]

NullableJSON implements IO custom type of JSON

func MustNullableJSONFrom

func MustNullableJSONFrom(v any) *NullableJSON

func NullableJSONFrom

func NullableJSONFrom(v any) (*NullableJSON, error)

func (*NullableJSON) DataOr

func (j *NullableJSON) DataOr(def any) any

DataOr returns data or default value

func (NullableJSON) MarshalGQL

func (j NullableJSON) MarshalGQL(w io.Writer)

MarshalGQL implements method of interface graphql.Marshaler

func (*NullableJSON) SetValue

func (j *NullableJSON) SetValue(v any) error

SetValue from any object

func (*NullableJSON) UnmarshalGQL

func (j *NullableJSON) UnmarshalGQL(v any) error

UnmarshalGQL implements method of interface graphql.Unmarshaler

func (NullableJSON) Value

func (j NullableJSON) Value() any

Value object

type TimeDuration

type TimeDuration time.Duration

TimeDuration implements IO custom type of time with custom format

func (TimeDuration) Duration

func (t TimeDuration) Duration() time.Duration

Duration object from TimeDuration

func (TimeDuration) MarshalGQL

func (t TimeDuration) MarshalGQL(w io.Writer)

MarshalGQL implements method of interface graphql.Marshaler

func (*TimeDuration) SetDuration

func (t *TimeDuration) SetDuration(d time.Duration)

SetDuration from time object

func (*TimeDuration) UnmarshalGQL

func (t *TimeDuration) UnmarshalGQL(v any) error

UnmarshalGQL implements method of interface graphql.Unmarshaler

Jump to

Keyboard shortcuts

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