Versions in this module Expand all Collapse all v0 v0.3.1 Feb 17, 2021 Changes in this version + type GqlPoint struct + Latitude *GqlFloat64 + Longitude *GqlFloat64 + func NewPoint(lat, lng float64) *GqlPoint + func NewPointStruct(lat, lng float64) GqlPoint v0.3.0 Feb 13, 2021 Changes in this version + type Client struct + func NewClient(url string, httpClient *http.Client) *Client + func (c *Client) Mutate(ctx context.Context, m interface{}, variables map[string]interface{}) error + func (c *Client) MutateRaw(ctx context.Context, m interface{}, variables map[string]interface{}) (*json.RawMessage, error) + func (c *Client) NamedMutate(ctx context.Context, name string, m interface{}, ...) error + func (c *Client) NamedMutateRaw(ctx context.Context, name string, m interface{}, ...) (*json.RawMessage, error) + func (c *Client) NamedQuery(ctx context.Context, name string, q interface{}, ...) error + func (c *Client) NamedQueryRaw(ctx context.Context, name string, q interface{}, ...) (*json.RawMessage, error) + func (c *Client) Query(ctx context.Context, q interface{}, variables map[string]interface{}) error + func (c *Client) QueryRaw(ctx context.Context, q interface{}, variables map[string]interface{}) (*json.RawMessage, error) + type GqlBool struct + Bool bool + Valid bool + func NewBool(x bool) *GqlBool + func NewBoolStruct(x bool) GqlBool + func (nb *GqlBool) UnmarshalJSON(data []byte) error + func (nb GqlBool) MarshalJSON() ([]byte, error) + type GqlFloat64 struct + Float64 float64 + Valid bool + func NewFloat64(x float64) *GqlFloat64 + func NewFloat64Struct(x float64) GqlFloat64 + func (nf *GqlFloat64) UnmarshalJSON(data []byte) error + func (nf GqlFloat64) MarshalJSON() ([]byte, error) + type GqlID struct + ID string + func NewID(x string) *GqlID + func NewIDStruct(x string) GqlID + func (id *GqlID) MarshalJSON() ([]byte, error) + func (id *GqlID) UnmarshalJSON(data []byte) error + type GqlInt64 struct + Int64 int64 + Valid bool + func NewInt64(x int64) *GqlInt64 + func NewInt64Struct(x int64) GqlInt64 + func (ni *GqlInt64) UnmarshalJSON(data []byte) error + func (ni GqlInt64) MarshalJSON() ([]byte, error) + type GqlString struct + String string + Valid bool + func NewString(x string) *GqlString + func NewStringStruct(x string) GqlString + func (ns *GqlString) UnmarshalJSON(data []byte) error + func (ns GqlString) MarshalJSON() ([]byte, error) + type GqlTime struct + Time time.Time + Valid bool + func NewTime(x time.Time) *GqlTime + func NewTimeStruct(x time.Time) GqlTime + func (nt *GqlTime) UnmarshalJSON(data []byte) error + func (nt GqlTime) MarshalJSON() ([]byte, error) + type OperationMessage struct + ID string + Payload json.RawMessage + Type OperationMessageType + func (om OperationMessage) String() string + type OperationMessageType string + const GQL_COMPLETE + const GQL_CONNECTION_ACK + const GQL_CONNECTION_ERROR + const GQL_CONNECTION_INIT + const GQL_CONNECTION_KEEP_ALIVE + const GQL_CONNECTION_TERMINATE + const GQL_DATA + const GQL_ERROR + const GQL_INTERNAL + const GQL_START + const GQL_STOP + const GQL_UNKNOWN + type Query struct + Data interface{} + type SubscriptionClient struct + func NewSubscriptionClient(url string) *SubscriptionClient + func (sc *SubscriptionClient) Close() (err error) + func (sc *SubscriptionClient) GetContext() context.Context + func (sc *SubscriptionClient) GetTimeout() time.Duration + func (sc *SubscriptionClient) GetURL() string + func (sc *SubscriptionClient) NamedSubscribe(name string, v interface{}, variables map[string]interface{}, ...) (string, error) + func (sc *SubscriptionClient) OnConnected(fn func()) *SubscriptionClient + func (sc *SubscriptionClient) OnDisconnected(fn func()) *SubscriptionClient + func (sc *SubscriptionClient) OnError(onError func(sc *SubscriptionClient, err error) error) *SubscriptionClient + func (sc *SubscriptionClient) Reset() error + func (sc *SubscriptionClient) Run() error + func (sc *SubscriptionClient) Subscribe(v interface{}, variables map[string]interface{}, ...) (string, error) + func (sc *SubscriptionClient) Unsubscribe(id string) error + func (sc *SubscriptionClient) WithConnectionParams(params map[string]interface{}) *SubscriptionClient + func (sc *SubscriptionClient) WithLog(logger func(args ...interface{})) *SubscriptionClient + func (sc *SubscriptionClient) WithReadLimit(limit int64) *SubscriptionClient + func (sc *SubscriptionClient) WithRetryTimeout(timeout time.Duration) *SubscriptionClient + func (sc *SubscriptionClient) WithTimeout(timeout time.Duration) *SubscriptionClient + func (sc *SubscriptionClient) WithWebSocket(fn func(sc *SubscriptionClient) (WebsocketConn, error)) *SubscriptionClient + func (sc *SubscriptionClient) WithoutLogTypes(types ...OperationMessageType) *SubscriptionClient + type WebsocketConn interface + Close func() error + ReadJSON func(v interface{}) error + SetReadLimit func(limit int64) + WriteJSON func(v interface{}) error