Documentation ¶
Index ¶
- type Client
- func (c *Client) Authorize(input driver.AuthorizeInput) driver.AuthorizeOutput
- func (c *Client) FieldResolve(input driver.FieldResolveInput) driver.FieldResolveOutput
- func (c *Client) InterfaceResolveType(input driver.InterfaceResolveTypeInput) driver.InterfaceResolveTypeOutput
- func (c *Client) ScalarParse(input driver.ScalarParseInput) driver.ScalarParseOutput
- func (c *Client) ScalarSerialize(input driver.ScalarSerializeInput) driver.ScalarSerializeOutput
- func (c *Client) SetSecrets(input driver.SetSecretsInput) driver.SetSecretsOutput
- func (c *Client) Stream(driver.StreamInput) driver.StreamOutput
- func (c *Client) SubscriptionConnection(input driver.SubscriptionConnectionInput) driver.SubscriptionConnectionOutput
- func (c *Client) SubscriptionListen(driver.SubscriptionListenInput) driver.SubscriptionListenOutput
- func (c *Client) UnionResolveType(input driver.UnionResolveTypeInput) driver.UnionResolveTypeOutput
- type Config
- type ErrorLogger
- type HTTPClient
- type Handler
- type Muxer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { HTTPClient // URL of a proto server endpoint URL string }
Client implements driver by using Protocol Buffers over HTTP
func (*Client) Authorize ¶
func (c *Client) Authorize(input driver.AuthorizeInput) driver.AuthorizeOutput
Authorize over http
func (*Client) FieldResolve ¶
func (c *Client) FieldResolve(input driver.FieldResolveInput) driver.FieldResolveOutput
FieldResolve over http
func (*Client) InterfaceResolveType ¶
func (c *Client) InterfaceResolveType(input driver.InterfaceResolveTypeInput) driver.InterfaceResolveTypeOutput
InterfaceResolveType over http
func (*Client) ScalarParse ¶
func (c *Client) ScalarParse(input driver.ScalarParseInput) driver.ScalarParseOutput
ScalarParse over http
func (*Client) ScalarSerialize ¶
func (c *Client) ScalarSerialize(input driver.ScalarSerializeInput) driver.ScalarSerializeOutput
ScalarSerialize over http
func (*Client) SetSecrets ¶
func (c *Client) SetSecrets(input driver.SetSecretsInput) driver.SetSecretsOutput
SetSecrets using http
func (*Client) Stream ¶
func (c *Client) Stream(driver.StreamInput) driver.StreamOutput
Stream implements driver.Stream. Currently protocol buffer streaming is not supported over HTTP
func (*Client) SubscriptionConnection ¶
func (c *Client) SubscriptionConnection(input driver.SubscriptionConnectionInput) driver.SubscriptionConnectionOutput
SubscriptionConnection implements driver.SubscriptionConnection over HTTP
func (*Client) SubscriptionListen ¶
func (c *Client) SubscriptionListen(driver.SubscriptionListenInput) driver.SubscriptionListenOutput
SubscriptionListen implements driver.SubscriptionListen. Currently protocol buffer subscription listening is not supported over HTTP
func (*Client) UnionResolveType ¶
func (c *Client) UnionResolveType(input driver.UnionResolveTypeInput) driver.UnionResolveTypeOutput
UnionResolveType over http
type ErrorLogger ¶
type ErrorLogger interface {
Error(err error)
}
ErrorLogger logs unrecoverable errors while handling request
type HTTPClient ¶
HTTPClient for protocol buffer
type Handler ¶
type Handler struct { Muxer ErrorLogger }
Handler is a http.Handler for Protocol Buffers server
type Muxer ¶
type Muxer interface { Authorize(driver.AuthorizeInput) (bool, error) FieldResolve(driver.FieldResolveInput) (interface{}, error) InterfaceResolveType(driver.InterfaceResolveTypeInput) (string, error) SetSecrets(driver.SetSecretsInput) error ScalarParse(driver.ScalarParseInput) (interface{}, error) ScalarSerialize(driver.ScalarSerializeInput) (interface{}, error) UnionResolveType(driver.UnionResolveTypeInput) (string, error) SubscriptionConnection(driver.SubscriptionConnectionInput) (interface{}, error) }
Muxer for Protocol Buffer handler