helpers

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login() error

func RunCommand

func RunCommand(args []string) io.Reader

Types

type GraphQLClient

type GraphQLClient struct {
	Endpoint   string
	HTTPClient *http.Client
	AuthHeader string // Optional: for authentication
}

GraphQLClient is a simple client for making GraphQL requests

func NewGraphQLClient

func NewGraphQLClient(endpoint string) *GraphQLClient

NewGraphQLClient creates a new GraphQL client

func (*GraphQLClient) Execute

func (c *GraphQLClient) Execute(query string, variables map[string]interface{}, result any) error

Execute sends a GraphQL request and returns the response

type GraphQLRequest

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

GraphQLRequest represents the structure of a GraphQL query request

type Result

type Result struct {
	Data struct {
		SignIn struct {
			IDToken string `json:"idToken"`
		} `json:"signIn"`
	} `json:"data"`
	Errors []struct {
		Message string `json:"message"`
	} `json:"errors"`
}

Jump to

Keyboard shortcuts

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