Documentation ¶
Index ¶
- Constants
- func GqlContext(ctx goals.GoalEvaluationContext) map[string]interface{}
- type AsyncDataSource
- type AsyncGraphQLQueryBody
- type AsyncQueryRequest
- type AsyncQueryResponse
- type AsyncResultMetadata
- type ChainDataSource
- type DataSource
- type FixedDataSource
- type FixedDataSourceUnmarshaler
- type QueryResponse
- type SyncGraphQLQueryBody
- type SyncGraphqlDataSource
- func (ds SyncGraphqlDataSource) Query(ctx context.Context, queryName string, query string, ...) (*QueryResponse, error)
- func (ds SyncGraphqlDataSource) WithBasisT(basisT int64) SyncGraphqlDataSource
- func (ds SyncGraphqlDataSource) WithCorrelationId(correlationId string) SyncGraphqlDataSource
- func (ds SyncGraphqlDataSource) WithQueryCache(cache cache.QueryCache) SyncGraphqlDataSource
Constants ¶
View Source
const AsyncQueryName = "async-query"
Variables ¶
This section is empty.
Functions ¶
func GqlContext ¶
func GqlContext(ctx goals.GoalEvaluationContext) map[string]interface{}
Types ¶
type AsyncDataSource ¶
type AsyncDataSource struct {
// contains filtered or unexported fields
}
func NewAsyncDataSource ¶
func NewAsyncDataSource( multipleQuerySupport bool, req skill.RequestContext, evaluationMetadata goals.EvaluationMetadata, asyncResults map[string]AsyncQueryResponse, ) AsyncDataSource
func (AsyncDataSource) Query ¶
func (ds AsyncDataSource) Query(ctx context.Context, queryName string, query string, variables map[string]interface{}, output interface{}) (*QueryResponse, error)
type AsyncGraphQLQueryBody ¶ added in v0.0.62
type AsyncQueryRequest ¶
type AsyncQueryRequest struct { Name string `edn:"name"` Body AsyncGraphQLQueryBody `edn:"body"` Metadata string `edn:"metadata"` }
type AsyncQueryResponse ¶
type AsyncQueryResponse struct { Data edn.RawMessage `edn:"data"` Errors []struct { Message string `edn:"message"` } }
type AsyncResultMetadata ¶
type AsyncResultMetadata struct { EvaluationMetadata goals.EvaluationMetadata `edn:"evalMeta"` AsyncQueryResults map[string]AsyncQueryResponse `edn:"results"` InFlightQueryName string `edn:"query-name"` }
type ChainDataSource ¶
type ChainDataSource struct {
// contains filtered or unexported fields
}
ChainDataSource is a wrapper DataSource that takes a list of other DataSources and returns query results from the first applicable downstream source
func NewChainDataSource ¶
func NewChainDataSource(links ...DataSource) *ChainDataSource
func (ChainDataSource) Query ¶
func (ds ChainDataSource) Query(ctx context.Context, queryName string, query string, variables map[string]interface{}, output interface{}) (*QueryResponse, error)
type DataSource ¶
type FixedDataSource ¶
type FixedDataSource struct {
// contains filtered or unexported fields
}
FixedDataSource returns static data from responses passed in at construction time
func NewFixedDataSource ¶
func NewFixedDataSource(unmarshaler FixedDataSourceUnmarshaler, data map[string][]byte) FixedDataSource
func (FixedDataSource) Query ¶
func (ds FixedDataSource) Query(ctx context.Context, queryName string, query string, variables map[string]interface{}, output interface{}) (*QueryResponse, error)
type QueryResponse ¶
type QueryResponse struct {
AsyncRequestMade bool
}
type SyncGraphQLQueryBody ¶ added in v0.0.62
type SyncGraphqlDataSource ¶
type SyncGraphqlDataSource struct {
// contains filtered or unexported fields
}
func NewSyncGraphqlDataSource ¶
func NewSyncGraphqlDataSource(ctx context.Context, token string, url string, logger skill.Logger) SyncGraphqlDataSource
func NewSyncGraphqlDataSourceFromSkillRequest ¶ added in v0.0.48
func NewSyncGraphqlDataSourceFromSkillRequest(ctx context.Context, req skill.RequestContext, evalMeta goals.EvaluationMetadata) SyncGraphqlDataSource
func (SyncGraphqlDataSource) Query ¶
func (ds SyncGraphqlDataSource) Query(ctx context.Context, queryName string, query string, variables map[string]interface{}, output interface{}) (*QueryResponse, error)
func (SyncGraphqlDataSource) WithBasisT ¶ added in v0.0.58
func (ds SyncGraphqlDataSource) WithBasisT(basisT int64) SyncGraphqlDataSource
func (SyncGraphqlDataSource) WithCorrelationId ¶ added in v0.0.58
func (ds SyncGraphqlDataSource) WithCorrelationId(correlationId string) SyncGraphqlDataSource
func (SyncGraphqlDataSource) WithQueryCache ¶ added in v0.0.63
func (ds SyncGraphqlDataSource) WithQueryCache(cache cache.QueryCache) SyncGraphqlDataSource
Click to show internal directories.
Click to hide internal directories.