type Config struct {
Port int `yaml:"port"`
Timeout int `yaml:"timeout"`
StaticDir string `yaml:"static_dir"`
JSONIngestion bool `yaml:"json_ingestion"`
HTTPIngestion bool `yaml:"enable_http_ingestion"`
}
type Constraint struct {
Not *Constraint `json:"not,omitempty"`
All []Constraint `json:"all,omitempty"`
Any []Constraint `json:"any,omitempty"`
KeyIs *KeyIs `json:"key_is,omitempty"`
KeyIn *KeyIn `json:"key_in,omitempty"`
KeyMatch *KeyMatch `json:"key_match,omitempty"`
}
type QueryForm struct {
Input string `query:"query" json:"query"` // query to execute. Profile bool `query:"profile" json:"profile"` // if true, then profile information will be exposed to the user. Constraints *Constraint `query:"-" json:"where"`
}
type QueryResponse struct {
Name string `json:"name,omitempty"`
Body interface{} `json:"body,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}