requester

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Index

Constants

View Source
const DEFAULT_BASE_URL = "https://api.lightspark.com/graphql/server/2023-09-13"

Variables

This section is empty.

Functions

func ValidateBaseUrl added in v0.7.1

func ValidateBaseUrl(baseUrl string) error

Types

type Requester

type Requester struct {
	ApiTokenClientId string

	ApiTokenClientSecret string

	BaseUrl *string

	HTTPClient *http.Client
}

func NewRequester added in v0.7.1

func NewRequester(apiTokenClientId string, apiTokenClientSecret string) *Requester

func NewRequesterWithBaseUrl added in v0.7.1

func NewRequesterWithBaseUrl(apiTokenClientId string, apiTokenClientSecret string, baseUrl *string) *Requester

func (*Requester) ExecuteGraphql

func (r *Requester) ExecuteGraphql(query string, variables map[string]interface{},
	signingKey SigningKey,
) (map[string]interface{}, error)

type RsaSigningKey

type RsaSigningKey struct {
	PrivateKey []byte
}

func (*RsaSigningKey) Sign

func (s *RsaSigningKey) Sign(payload []byte) ([]byte, error)

type Secp256k1SigningKey

type Secp256k1SigningKey struct {
	PrivateKey []byte
}

func (*Secp256k1SigningKey) Sign

func (s *Secp256k1SigningKey) Sign(payload []byte) ([]byte, error)

type SigningKey

type SigningKey interface {
	Sign(payload []byte) ([]byte, error)
}

Jump to

Keyboard shortcuts

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