api

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNotFound error = errors.New("not found")
)

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient() *Client

func (*Client) DiscardChanges

func (c *Client) DiscardChanges() (bool, error)

func (*Client) GetEndpoint

func (c *Client) GetEndpoint() string

func (*Client) GetHost

func (c *Client) GetHost() string

func (*Client) GetToken

func (c *Client) GetToken() string

func (*Client) InfinityPortalAuthentication

func (c *Client) InfinityPortalAuthentication(clientId string, accessKey string) error

func (*Client) MakeGraphQLRequest

func (c *Client) MakeGraphQLRequest(ctx context.Context, gql, responseKey string, vars ...map[string]any) (any, error)

func (*Client) PublishChanges

func (c *Client) PublishChanges() (bool, error)

func (*Client) SetEndpoint

func (c *Client) SetEndpoint(endpoint string)

func (*Client) SetHost

func (c *Client) SetHost(host string)

func (*Client) SetToken

func (c *Client) SetToken(token string)

type GraphError

type GraphError struct {
	Message    string               `json:"message,omitempty"`
	Path       []string             `json:"path,omitempty"`
	Extensions *GraphErrorExtension `json:"extensions,omitempty"`
}

type GraphErrorExtension

type GraphErrorExtension struct {
	Code          string `json:"code,omitempty"`
	ReferenceID   string `json:"referenceId,omitempty"`
	MessageParams any    `json:"messageParams,omitempty"`
}

type GraphQLRequest

type GraphQLRequest struct {
	Query     string                 `json:"query"`
	Variables map[string]interface{} `json:"variables"`
}

type GraphResponse

type GraphResponse struct {
	Data   any          `json:"data"`
	Errors []GraphError `json:"errors,omitempty"`
}

type RetryErrorResponse

type RetryErrorResponse struct {
	Stop          any `json:"stop"`
	RC            any `json:"rc"`
	ReqDidTimeout any `json:"reqDidTimeout"`
}

Jump to

Keyboard shortcuts

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