Documentation
¶
Overview ¶
Package client provides an IPC client for the Hugr query engine. It communicates via the Hugr IPC multipart/mixed protocol.
Index ¶
- type Client
- func (c *Client) DataSourceStatus(ctx context.Context, name string) (string, error)
- func (c *Client) DescribeDataSource(ctx context.Context, name string, self bool) (string, error)
- func (c *Client) LoadDataSource(ctx context.Context, name string) error
- func (c *Client) Ping(ctx context.Context) (string, error)
- func (c *Client) Query(ctx context.Context, query string, vars map[string]any) (*types.Response, error)
- func (c *Client) QueryJSON(ctx context.Context, req types.JQRequest) (*db.JsonValue, error)
- func (c *Client) RegisterDataSource(ctx context.Context, ds types.DataSource) error
- func (c *Client) UnloadDataSource(ctx context.Context, name string) error
- func (c *Client) ValidateQuery(ctx context.Context, query string, vars map[string]any) error
- func (c *Client) ValidateQueryJSON(ctx context.Context, req types.JQRequest) error
- type ClientConfig
- type Option
- func WithApiKey(apiKey string) Option
- func WithApiKeyCustomHeader(apiKey, header string) Option
- func WithHttpUrl(httpUrl string) Option
- func WithJQQueryUrl(jq string) Option
- func WithTimeout(timeout time.Duration) Option
- func WithToken(token string) Option
- func WithTransport(transport http.RoundTripper) Option
- func WithUserInfo(id, name string) Option
- func WithUserInfoCustomHeader(id, name, idHeader, nameHeader string) Option
- func WithUserRole(role string) Option
- func WithUserRoleCustomHeader(role, header string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DataSourceStatus ¶
func (*Client) DescribeDataSource ¶
DescribeDataSource returns the description of the data source.
func (*Client) LoadDataSource ¶
func (*Client) RegisterDataSource ¶
func (*Client) UnloadDataSource ¶
func (*Client) ValidateQuery ¶
type ClientConfig ¶
type Option ¶
type Option func(*ClientConfig)
func WithApiKey ¶
func WithApiKeyCustomHeader ¶
func WithHttpUrl ¶
func WithJQQueryUrl ¶
func WithTimeout ¶
func WithTransport ¶
func WithTransport(transport http.RoundTripper) Option
func WithUserInfo ¶
func WithUserRole ¶
Click to show internal directories.
Click to hide internal directories.