-
Notifications
You must be signed in to change notification settings - Fork 0
Base DTO
samithiwat edited this page Feb 11, 2023
·
3 revisions
Data Transfer Object is the object use for represent the attribute between the service
The base query result entity for opensearch
The base entity is contains the essential attributes that entity should have
type QueryResult struct {
Took uint `json:"took"`
Timeout bool `json:"timeout"`
Shards Shard `json:"_shards"`
}
When you want to define new entity you need to embed this entity
type NewQueryResult struct{
gosdk.QueryResult
// other fields
}
The stats of shards
The value of the statistic of shard
type Shard struct {
Total uint `json:"total"`
Successful uint `json:"successful"`
Skipped uint `json:"skipped"`
Failed uint `json:"failed"`
}