Add missing platform directory
This commit is contained in:
parent
71419a94d9
commit
ffade2ae56
2 changed files with 40 additions and 0 deletions
25
platform/ios.go
Normal file
25
platform/ios.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package platform
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db/models"
|
||||
)
|
||||
|
||||
func fieldseeker(ctx context.Context, u *models.User, since *time.Time) (fsync FieldseekerRecordsSync, err error) {
|
||||
pl, err := u.R.Organization.Pointlocations().All(ctx, db.PGInstance.BobDB)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
fsync.MosquitoSources = pl
|
||||
return fsync, err
|
||||
}
|
||||
|
||||
func ContentClientIos(ctx context.Context, u *models.User, since *time.Time) (csync ClientSync, err error) {
|
||||
fsync, err := fieldseeker(ctx, u, since)
|
||||
return ClientSync{
|
||||
Fieldseeker: fsync,
|
||||
}, err
|
||||
}
|
||||
15
platform/type.go
Normal file
15
platform/type.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package platform
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db/models"
|
||||
)
|
||||
|
||||
type ClientSync struct {
|
||||
Fieldseeker FieldseekerRecordsSync
|
||||
Since time.Time
|
||||
}
|
||||
|
||||
type FieldseekerRecordsSync struct {
|
||||
MosquitoSources models.FieldseekerPointlocationSlice
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue