ghc

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

README

Golang Hasura Client

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client ....

func New

func New(apiURL string, opts *Options) (*Client, error)

New ...

func (*Client) Execute

func (c *Client) Execute(req *Request) (*Response, error)

Execute ...

type Container

type Container struct {
	// contains filtered or unexported fields
}

Container ...

func (*Container) To

func (c *Container) To(t interface{}) error

To ...

type Data

type Data struct {
	// contains filtered or unexported fields
}

Data ...

func (*Data) Container

func (d *Data) Container() *gabs.Container

Container ...

func (*Data) Path

func (d *Data) Path(p string) *Container

Path ...

func (*Data) UnmarshalJSON

func (d *Data) UnmarshalJSON(db []byte) error

UnmarshalJSON ...

type HasuraQuery

type HasuraQuery interface {
	String() string
}

HasuraQuery ...

func NewMutation

func NewMutation(str string, args ...interface{}) HasuraQuery

NewMutation ...

func NewQuery

func NewQuery(str string, args ...interface{}) HasuraQuery

NewQuery ...

func NewSubscription

func NewSubscription(str string, args ...interface{}) HasuraQuery

NewSubscription ...

type Model

type Model interface {
	Table() string
	Schema() []string
}

Model ...

type Mutation

type Mutation string

Mutation ....

func (Mutation) String

func (q Mutation) String() string

type Options

type Options struct {
	Header http.Header
}

Options ...

type Query

type Query string

Query ...

func (Query) String

func (q Query) String() string

type Request

type Request struct {
	Query     HasuraQuery `json:"query"`
	Variables `json:"variables,omitempty"`
	// contains filtered or unexported fields
}

Request ...

func HasuraRequest

func HasuraRequest(query HasuraQuery, vars Variables) *Request

HasuraRequest ...

func (*Request) Type

func (r *Request) Type() reflect.Type

Type ...

type Response

type Response struct {
	Data         *Data         `json:"data,omitempty"`
	Errors       []interface{} `json:"errors,omitempty"`
	Subscription chan interface{}
}

Response ...

type Subscription

type Subscription string

Subscription ...

func (Subscription) String

func (q Subscription) String() string

type Variables

type Variables map[string]interface{}

Variables ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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