penguin/golifehk

@golifehk bot in Telegram

query/objects.go

raw ยท 425 bytes

package query

type QTerm struct {
	Org   string
	Value string
	IsKey bool
}

type QueryMessage struct {
	Lang     string
	Text     string
	Location *GeoLocation
}

type QueryObject struct {
	Key         string
	Message     *QueryMessage
	SearchTerms *[]*QTerm
	Results     *[]ISearchable
}

type IQueryResult interface {
	Message() (string, error)
	DataType() string
	GetTableData() [][]map[string]string
	Consumed() bool
}