Documentation ¶
Overview ¶
TODO: Expose this package in the SDK.
Index ¶
- Variables
- func DecodeStruct(input, output any) error
- type CueValue
- func (cv CueValue) Bytes() []byte
- func (_ CueValue) ImplementsGraphQLType(name string) bool
- func (cv CueValue) MarshalJSON() ([]byte, error)
- func (cv *CueValue) Scan(src any) error
- func (cv CueValue) String() string
- func (cv *CueValue) UnmarshalGraphQL(input any) (err error)
- func (cv *CueValue) UnmarshalJSON(bs []byte) error
- func (cv CueValue) Value() (driver.Value, error)
- type DatabaseScalar
- type GraphQLScalar
- type Instant
- func (inst Instant) After(other Instant) bool
- func (inst Instant) Before(other Instant) bool
- func (inst Instant) Equal(other Instant) bool
- func (inst Instant) GoTime() time.Time
- func (_ Instant) ImplementsGraphQLType(name string) bool
- func (inst Instant) MarshalJSON() ([]byte, error)
- func (inst *Instant) Scan(src any) error
- func (inst Instant) String() string
- func (inst Instant) Sub(other Instant) time.Duration
- func (inst Instant) UnixMilli() int64
- func (inst *Instant) UnmarshalGraphQL(input any) (err error)
- func (inst *Instant) UnmarshalJSON(bs []byte) (err error)
- func (inst Instant) Value() (driver.Value, error)
- type JSONObject
- func (_ JSONObject) ImplementsGraphQLType(name string) bool
- func (obj JSONObject) MarshalJSON() ([]byte, error)
- func (obj *JSONObject) Scan(src any) error
- func (obj *JSONObject) UnmarshalGraphQL(input any) (err error)
- func (obj *JSONObject) UnmarshalJSON(bs []byte) (err error)
- func (obj JSONObject) Value() (driver.Value, error)
- type RawJSON
- type Scalar
- type ULID
- func (_ ULID) ImplementsGraphQLType(name string) bool
- func (u ULID) MarshalJSON() ([]byte, error)
- func (u *ULID) Scan(src any) error
- func (u ULID) String() string
- func (u ULID) Timestamp() Instant
- func (u *ULID) UnmarshalGraphQL(input any) error
- func (u ULID) UnmarshalJSON(bs []byte) (err error)
- func (u ULID) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var InfiniteULID = ULID{
0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF,
}
Greater than any valid ULID.
Functions ¶
func DecodeStruct ¶
Types ¶
type CueValue ¶
func EncodeCueValue ¶
func (CueValue) ImplementsGraphQLType ¶
func (CueValue) MarshalJSON ¶
func (*CueValue) UnmarshalGraphQL ¶
func (*CueValue) UnmarshalJSON ¶
type GraphQLScalar ¶
type GraphQLScalar interface { graphql.Unmarshaler json.Marshaler json.Unmarshaler }
type Instant ¶
type Instant struct {
// contains filtered or unexported fields
}
func GoTimeToInstant ¶
func (Instant) ImplementsGraphQLType ¶
func (Instant) MarshalJSON ¶
func (*Instant) UnmarshalGraphQL ¶
func (*Instant) UnmarshalJSON ¶
type JSONObject ¶
JSON scalar for values known to be map-like objects. Marshals to and from the database as an encoded JSON string, but marshals to and from GraphQL as plain JSON-values, avoiding double-encoding.
func (JSONObject) ImplementsGraphQLType ¶
func (_ JSONObject) ImplementsGraphQLType(name string) bool
func (JSONObject) MarshalJSON ¶
func (obj JSONObject) MarshalJSON() ([]byte, error)
func (*JSONObject) Scan ¶
func (obj *JSONObject) Scan(src any) error
func (*JSONObject) UnmarshalGraphQL ¶
func (obj *JSONObject) UnmarshalGraphQL(input any) (err error)
func (*JSONObject) UnmarshalJSON ¶
func (obj *JSONObject) UnmarshalJSON(bs []byte) (err error)
type RawJSON ¶
type RawJSON []byte
JSON scalar with json.RawMessage style unmarshaling behavior.
func (RawJSON) MarshalJSON ¶
Same as json.RawMessage.MarshalJSON.
func (*RawJSON) UnmarshalJSON ¶
Same as json.RawMessage.UnmarshalJSON.
type Scalar ¶
type Scalar interface { GraphQLScalar DatabaseScalar }
type ULID ¶
type ULID [16]byte
func IncrementULID ¶
func InstantToULID ¶
func (ULID) ImplementsGraphQLType ¶
func (ULID) MarshalJSON ¶
func (*ULID) UnmarshalGraphQL ¶
func (ULID) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.