graphql

package
v0.0.0-...-61b73f6 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New() (*Client, error)

func (*Client) ChangeUser

func (c *Client) ChangeUser(user User) error

func (*Client) DisableLogging

func (c *Client) DisableLogging()

func (*Client) Do

func (c *Client) Do(req *Request, res interface{}) error

func (*Client) DoQuery

func (c *Client) DoQuery(q string, res interface{}) error

func (*Client) Subscribe

func (c *Client) Subscribe(req *Request) *Subscription

type Request

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

func NewRequest

func NewRequest(q string) *Request

func (*Request) AddHeader

func (r *Request) AddHeader(key, value string)

func (*Request) JSON

func (r *Request) JSON() ([]byte, error)

func (*Request) SetVar

func (r *Request) SetVar(key string, value interface{})

type Subscription

type Subscription struct {
	Close        func() error
	IsCloseError func(err error, codes ...int) bool
	Next         func(response interface{}, timeout time.Duration) error
}

type User

type User string
const (
	AdminUser    User = "admin"
	ReadOnlyUser User = "read-only"
	NoRightsUser User = "no-rights"
	NoUser       User = "no-user"
)

Jump to

Keyboard shortcuts

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