Answer the question
In order to leave comments, you need to log in
How to group data in go using mgo?
Good day, comrades! There was a problem with mGo.
I have the following entities:
type Record struct {
ID bson.ObjectId `bson:"_id,omitempty"`
EndPoint string `bson:"EndPoint"`
ReceivedTime time.Time `bson:"ReceivedTime"`
}
type Message struct {
ID bson.ObjectId `bson:"_id,omitempty"`
EndPoint string `bson:"EndPoint"`
ReceivedTime time.Time `bson:"ReceivedTime"`
}
type MessageRecordCount struct {
EndPoint string `json:"EndPoint"`
MessageCount int `json:"MessageCount"`
RecordCount int `json:"RecordCount"`
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question