Documentation
¶
Index ¶
Constants ¶
View Source
const MsgInputsKeyMissing = "'inputs' key missing from the request"
View Source
const (
PrometheusHandle = "v1/batch/data"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BatchDataRequestV1 ¶
type BatchDataRequestV1 struct { Inputs map[string]*any `json:"inputs"` CommonInput *any `json:"common_input,omitempty"` }
BatchDataRequestV1 models the request message for batched Data API POST operations. CommonInput is intended as an optional field, which is merged with each query's input object before evaluation.
type BatchDataRequestV1Unparsed ¶
type BatchDataRequestV1Unparsed struct { Inputs map[string]*json.RawMessage `json:"inputs"` // Parsing of the inputs is deferred. CommonInput *any `json:"common_input,omitempty"` }
type BatchDataRespType ¶
type BatchDataRespType interface {
GetHTTPStatusCode() string
}
Note(philip): This is a bit of a hack to ensure we only get the 2x intended types embedded in the BatchDataResponse struct.
type BatchDataResponseV1 ¶
type BatchDataResponseV1 struct { Metrics types.MetricsV1 `json:"metrics,omitempty"` Responses map[string]BatchDataRespType `json:"responses,omitempty"` Warning *types.Warning `json:"warning,omitempty"` BatchDecisionID string `json:"batch_decision_id,omitempty"` }
BatchDataResponseV1 models the response message for batched Data API read operations.
func (*BatchDataResponseV1) UnmarshalJSON ¶
func (bdr *BatchDataResponseV1) UnmarshalJSON(b []byte) error
Note(philip): We have to do custom JSON unmarshalling here to work around the fact that our response representation is not perfect.
type BatchQueryHandler ¶
type BatchQueryHandler interface { http.Handler GetManager() *plugins.Manager SetManager(*plugins.Manager) error WithLicensedMode(bool) BatchQueryHandler WithDecisionIDFactory(func() string) BatchQueryHandler WithDecisionLogger(logger func(context.Context, *server.Info) error) BatchQueryHandler }
func Handler ¶
func Handler(l logging.Logger) BatchQueryHandler
type DataResponseWithHTTPCodeV1 ¶
type DataResponseWithHTTPCodeV1 struct { types.DataResponseV1 HTTPStatusCode string `json:"http_status_code,omitempty"` }
DataResponseWithCodeV1 models the response message for Data API read operations.
func (DataResponseWithHTTPCodeV1) GetHTTPStatusCode ¶
func (r DataResponseWithHTTPCodeV1) GetHTTPStatusCode() string
type ErrorResponseWithHTTPCodeV1 ¶
type ErrorResponseWithHTTPCodeV1 struct { DecisionID string `json:"decision_id,omitempty"` HTTPStatusCode string `json:"http_status_code,omitempty"` types.ErrorV1 }
func (ErrorResponseWithHTTPCodeV1) GetHTTPStatusCode ¶
func (r ErrorResponseWithHTTPCodeV1) GetHTTPStatusCode() string
Click to show internal directories.
Click to hide internal directories.