Versions in this module Expand all Collapse all v0 v0.2.0 Mar 5, 2022 v0.1.0 Aug 12, 2021 Changes in this version + type APITokenInfo struct + ExpiresAt time.Time + Token string + func (t *APITokenInfo) IsAboutToExpire() bool + func (t *APITokenInfo) MarshalLogObject(encoder zapcore.ObjectEncoder) error + type APITokenStore interface + Get func(ctx context.Context) (*APITokenInfo, error) + Set func(ctx context.Context, token *APITokenInfo) error + type Client interface + GetAPITokenInfo func(ctx context.Context) (*APITokenInfo, error) + GraphQLQuery func(ctx context.Context, document string, opts ...GraphQLOption) (*pbgraphql.Response, error) + GraphQLSubscription func(ctx context.Context, document string, opts ...GraphQLOption) (GraphQLStream, error) + func NewClient(network string, apiKey string, opts ...ClientOption) (Client, error) + type ClientOption interface + func WithAPITokenStore(store APITokenStore) ClientOption + func WithAuthURL(authURL string) ClientOption + func WithGRPCPort(port int) ClientOption + func WithInsecure() ClientOption + func WithLogger(logger *zap.Logger) ClientOption + func WithPlainText() ClientOption + func WithoutAuthentication() ClientOption + type ExperimentalClient interface + RawGraphQL func(ctx context.Context, document string, opts ...GraphQLOption) (pbgraphql.GraphQL_ExecuteClient, error) + type FileAPITokenStore struct + func NewFileAPITokenStore(filePath string) *FileAPITokenStore + func (s *FileAPITokenStore) Get(ctx context.Context) (*APITokenInfo, error) + func (s *FileAPITokenStore) Set(ctx context.Context, token *APITokenInfo) error + func (s *FileAPITokenStore) String() string + type GraphQLDocument interface + Load func(ctx context.Context) (string, error) + type GraphQLFileDocument string + func (d GraphQLFileDocument) Load(ctx context.Context) (string, error) + type GraphQLOption interface + type GraphQLStream interface + type GraphQLStringDocument string + func (d GraphQLStringDocument) Load(ctx context.Context) (string, error) + type GraphQLVariables map[string]interface + type InMemoryAPITokenStore struct + func NewInMemoryAPITokenStore() *InMemoryAPITokenStore + func (s *InMemoryAPITokenStore) Get(ctx context.Context) (*APITokenInfo, error) + func (s *InMemoryAPITokenStore) Set(ctx context.Context, token *APITokenInfo) error + func (s *InMemoryAPITokenStore) String() string + type OnDiskAPITokenStore struct + func NewOnDiskAPITokenStore(apiKey string) *OnDiskAPITokenStore