client

package
v0.0.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BaseAuthorizationURL = "https://login.afosto.io/authorize"
	BaseApiUrl           = "https://api.afosto.io"
	OauthClientID        = "51403354ded11942d7195c66b9e81f71b74f56cd8adc539277823e179da8"
	RedirectURL          = "http://localhost:8888/return"
)

Variables

This section is empty.

Functions

func GetAuthorizationURL

func GetAuthorizationURL() string

Types

type AfostoClient

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

func GetClient

func GetClient(tenantID string, accessToken string) *AfostoClient

func (*AfostoClient) GetTenant

func (ac *AfostoClient) GetTenant() (*data.Tenant, error)

func (*AfostoClient) Query

func (ac *AfostoClient) Query(query string, parameters interface{}) (*QueryResult, error)

type Query

type Query struct {
	OperationName *string     `json:"operationName"`
	Query         string      `json:"query"`
	Variables     interface{} `json:"variables"`
}

type QueryError

type QueryError struct {
	Message string   `json:"message"`
	Path    []string `json:"path"`
}

type QueryResult

type QueryResult struct {
	Data   map[string]interface{} `json:"data"`
	Errors []QueryError           `json:"errors"`
}

Jump to

Keyboard shortcuts

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