Documentation ¶
Index ¶
- Variables
- func NewTwispClient(endpoint string, httpClient *http.Client) graphql.Client
- func NewTwispHttp(customerAccount, twispEnvironment, region string) *http.Client
- func NewTwispRoundTripper(customerAccount, twispEnvironment, region string, now Now) http.RoundTripper
- func WithVariables(ctx context.Context, variables map[string]interface{}) context.Context
- type Now
- type TwispContextKeyType
Constants ¶
This section is empty.
Variables ¶
View Source
var TwispContextKey = TwispContextKeyType("ctx")
Functions ¶
func NewTwispClient ¶
NewTwispClient implements a graphql.Client that allows override/merging of Variables sent by the client. This allows Twisp to use graphql variables without having to have every query have typed inputs.
func NewTwispHttp ¶
NewTwispHttp returns an *http.Client that sets authorization and x-twisp-account-id headers. example: NewTwispHttp("Twisp1234", "cloud", "us-east-1")
func NewTwispRoundTripper ¶
func NewTwispRoundTripper(customerAccount, twispEnvironment, region string, now Now) http.RoundTripper
Types ¶
type TwispContextKeyType ¶
type TwispContextKeyType string
Click to show internal directories.
Click to hide internal directories.