Documentation ¶
Index ¶
- func LoadGeoJSONFile(fileName string) (*geojson.FeatureCollection, error)
- type EmailService
- type GeoJsonService
- type LogsService
- func (ls *LogsService) CreateForUser(ctx context.Context, uID string, logg *model.Logg) (string, error)
- func (ls *LogsService) GetAggregatedSymptoms(ctx context.Context, precision int, sw model.GeoLocation, ne model.GeoLocation) (*model.LogSearchResults, error)
- func (ls *LogsService) Reindex(ctx context.Context) error
- func (ls *LogsService) Update(ctx context.Context, ID string, log *model.Logg) error
- type ResponeList
- type UserService
- func (us *UserService) Create(ctx context.Context, user *model.User) (string, error)
- func (us *UserService) Get(ctx context.Context, ID string) (*model.User, error)
- func (us *UserService) Update(ctx context.Context, ID string, m *model.User) error
- func (us *UserService) VerifyEmail(ctx context.Context, ID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadGeoJSONFile ¶
func LoadGeoJSONFile(fileName string) (*geojson.FeatureCollection, error)
Types ¶
type EmailService ¶
type EmailService struct {
// contains filtered or unexported fields
}
EmailService ...
func NewEmailService ¶
func NewEmailService(sendgrid *sendgrid.Client, apiKey string, userPendingID, userListID string, log *logrus.Logger) *EmailService
NewEmailService ...
func (*EmailService) UserPending ¶
func (ems *EmailService) UserPending(ctx context.Context, email, id string) error
UserPending in sendgrid
func (*EmailService) UserSubscribed ¶
func (ems *EmailService) UserSubscribed(ctx context.Context, id, email string) error
UserSubscribed will remove the user from the pending list and add it to the subscribed list
type GeoJsonService ¶
type GeoJsonService struct {
// contains filtered or unexported fields
}
func NewGeoJson ¶
func NewGeoJson(mappings map[int][]string) *GeoJsonService
func (*GeoJsonService) GetAllFeaturesFor ¶
func (g *GeoJsonService) GetAllFeaturesFor(points ...*model.Location) []*model.Feature
func (*GeoJsonService) GetFeatureIdsFor ¶
func (g *GeoJsonService) GetFeatureIdsFor(precision int, point *model.GeoLocation) string
func (*GeoJsonService) GetGeoJsonByPrecision ¶
func (g *GeoJsonService) GetGeoJsonByPrecision(currentPrecision int) *geojson.FeatureCollection
type LogsService ¶
type LogsService struct {
// contains filtered or unexported fields
}
LogsService ...
func NewlogsService ¶
func NewlogsService(es *persistence.Es, freshEs *persistence.Es, logger *logrus.Logger, gs *GeoJsonService) *LogsService
NewlogsService ...
func (*LogsService) CreateForUser ¶
func (ls *LogsService) CreateForUser(ctx context.Context, uID string, logg *model.Logg) (string, error)
CreateForUser a new log
func (*LogsService) GetAggregatedSymptoms ¶
func (ls *LogsService) GetAggregatedSymptoms(ctx context.Context, precision int, sw model.GeoLocation, ne model.GeoLocation) (*model.LogSearchResults, error)
GetAggregatedSymptoms ...
type ResponeList ¶
ResponeList with resposne from email service
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
UserService ...
func NewUserService ¶
func NewUserService(es *persistence.Es, emails *EmailService) *UserService
NewUserService ...
func (*UserService) VerifyEmail ¶
func (us *UserService) VerifyEmail(ctx context.Context, ID string) error
VerifyEmail moves the user to a verified user state
Click to show internal directories.
Click to hide internal directories.