Documentation ¶
Index ¶
- Constants
- func HasuraApiRequest(host string, token string, body string) error
- func HasuraCreateView(host string, token string, viewName string, viewAs string, materialized bool) error
- func HasuraTrackTable(host string, token string, table string) error
- func RefreshMaterializedView(host string, token string, viewName string) error
- type GraphqlClient
- type GraphqlSubscriptionClient
- func (c *GraphqlSubscriptionClient) GetState() bool
- func (c *GraphqlSubscriptionClient) Start() error
- func (c *GraphqlSubscriptionClient) Stop() error
- func (c *GraphqlSubscriptionClient) Subscribe(query interface{}, handler func(message []byte, err error) error) error
- func (c *GraphqlSubscriptionClient) Unsubscribe() error
Constants ¶
View Source
const ConnectTimeout = 10 * time.Second
Variables ¶
This section is empty.
Functions ¶
func HasuraCreateView ¶
Types ¶
type GraphqlClient ¶
type GraphqlClient struct { Host string Client *graphql.Client }
func NewGraphqlQueryClient ¶
func NewGraphqlQueryClient(host string, token string) *GraphqlClient
func (*GraphqlClient) Connect ¶
func (c *GraphqlClient) Connect() error
type GraphqlSubscriptionClient ¶
type GraphqlSubscriptionClient struct { Client *graphql.SubscriptionClient Id string // contains filtered or unexported fields }
func NewGraphqlSubscriptionClient ¶
func NewGraphqlSubscriptionClient(host string, token string) (error, *GraphqlSubscriptionClient)
func (*GraphqlSubscriptionClient) GetState ¶
func (c *GraphqlSubscriptionClient) GetState() bool
func (*GraphqlSubscriptionClient) Start ¶
func (c *GraphqlSubscriptionClient) Start() error
func (*GraphqlSubscriptionClient) Stop ¶
func (c *GraphqlSubscriptionClient) Stop() error
func (*GraphqlSubscriptionClient) Subscribe ¶
func (c *GraphqlSubscriptionClient) Subscribe(query interface{}, handler func(message []byte, err error) error) error
func (*GraphqlSubscriptionClient) Unsubscribe ¶
func (c *GraphqlSubscriptionClient) Unsubscribe() error
Click to show internal directories.
Click to hide internal directories.