modulepackage
1.7.0
Repository: https://github.com/sony/appsync-client-go.git
Documentation: pkg.go.dev
# README
appsync-client-go
AWS AppSync Go client library
Features
- GraphQL Query(Queries, Mutations and Subscriptions).
- MQTT over Websocket for subscriptions.
- Pure Websockets subscriptions.
Getting Started
Installation
$ go get github.com/sony/appsync-client-go
Example
See example.
License
This library is distributed under The MIT license. See LICENSE and NOTICE for more information.
# Functions
NewClient returns a Client instance.
NewExtensions returns Extensions instance.
NewGraphQLClient returns a GraphQLClient interface.
NewPureWebSocketSubscriber returns a PureWebSocketSubscriber instance.
NewSubscriber returns a new Subscriber instance.
WithAPIKey returns a PureWebSocketSubscriberOption configured with the host for the AWS AppSync GraphQL endpoint and API key.
WithIAM returns a PureWebSocketSubscriberOption configured with the signature version 4 signer, the region and the host for the AWS AppSync GraphQL endpoint.
WithIAMAuthorization returns a ClientOption configured with the given sdk v1 signature version 4 signer.
WithIAMAuthorizationV1 returns a ClientOption configured with the given sdk v1 signature version 4 signer.
WithIAMAuthorizationV2 returns a ClientOption configured with the given sdk v2 signature version 4 signer.
WithIAMV1 returns a PureWebSocketSubscriberOption configured with the sdk v1 signature version 4 signer, the region and the url for the AWS AppSync GraphQL endpoint.
WithIAMV2 returns a PureWebSocketSubscriberOption configured with the sdk v2 signature version 4 signer, the credentials, the region and the url for the AWS AppSync GraphQL endpoint.
WithOIDC returns a PureWebSocketSubscriberOption configured with the host for the AWS AppSync GraphQL endpoint and JWT Access Token.
WithSubscriberID returns a ClientOption configured with the given AppSync subscriber ID.
# Structs
Client is the AppSync GraphQL API client.
Extensions represents AWS AppSync subscription response extensions.
PureWebSocketSubscriber has pure WebSocket connections and subscription information.
Subscriber has MQTT connections and subscription information.
Subscription represents AWS AppSync subscription mqtt topic.
# Interfaces
GraphQLClient is the interface to access GraphQL server.
# Type aliases
ClientOption represents options for an AppSync client.
PureWebSocketSubscriberOption represents options for an PureWebSocketSubscriber.