Documentation ¶
Index ¶
- Variables
- type Controller
- func (c *Controller) AddSensors(session *tables.User, station *tables.Station, sensors []tables.Sensor) error
- func (c *Controller) Authenticate(u *tables.User) (*tables.User, error)
- func (c *Controller) Authorize(jwtS string) (*tables.User, error)
- func (c *Controller) AuthorizeAPIKey(apiKey string) (*tables.Station, error)
- func (c *Controller) CheckAlert(registry *tables.SensorRegistry) ([]tables.Alert, error)
- func (c *Controller) Close() error
- func (c *Controller) ConfirmAccount(emailCode string) error
- func (c *Controller) CreateAlert(session *tables.User, alert *tables.Alert) error
- func (c *Controller) CreateStation(session *tables.User, station *tables.Station) (*tables.Station, error)
- func (c *Controller) DeleteAlert(session *tables.User, alert *tables.Alert) error
- func (c *Controller) DeleteSensors(session *tables.User, station *tables.Station, sensors []tables.Sensor) error
- func (c *Controller) DeleteStation(session *tables.User, station *tables.Station) error
- func (c *Controller) Historical(filter *HistoricalFilter) ([]tables.SensorRegistry, error)
- func (c *Controller) PushRegistry(session *tables.Station, registries []tables.SensorRegistry) (err error)
- func (c *Controller) QueryAccount(session *tables.User) (*tables.User, error)
- func (c *Controller) QueryManyAlert(session *tables.User, filter *Filter[tables.Alert]) (*Results[tables.Alert], error)
- func (c *Controller) QueryManyStation(filter *Filter[tables.Station]) (*Results[tables.Station], error)
- func (c *Controller) QueryOneAlert(session *tables.User, alert *tables.Alert) (*tables.Alert, error)
- func (c *Controller) QueryStationAPIKey(session *tables.User, station *tables.Station) (*tables.Station, error)
- func (c *Controller) QueryStationNoAPIKey(station *tables.Station) (*tables.Station, error)
- func (c *Controller) Register(u *tables.User) error
- func (c *Controller) RequestConfirmation(session *tables.User) (string, error)
- func (c *Controller) RequestResetPassword(account *tables.User) (string, error)
- func (c *Controller) ResetPassword(resetCode string, newPassword string) error
- func (c *Controller) SendMessage(message *tables.Message) error
- func (c *Controller) UpdateAccount(session, details *tables.User, password string) error
- func (c *Controller) UpdateAlert(session *tables.User, alert *tables.Alert) error
- func (c *Controller) UpdatePassword(session *tables.User, currentPassword, newPassword string) error
- func (c *Controller) UpdateStation(session *tables.User, station *tables.Station) error
- type Filter
- type HistoricalFilter
- type MailOptions
- type Options
- type Results
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { DB *gorm.DB EmailCache cache.Cache PasswordCache cache.Cache JWT *session.JWT MailHost string MailFrom string MailOptions []mail.Option }
func NewController ¶
func NewController(options *Options) *Controller
func (*Controller) AddSensors ¶
func (*Controller) Authenticate ¶
func (*Controller) AuthorizeAPIKey ¶
func (c *Controller) AuthorizeAPIKey(apiKey string) (*tables.Station, error)
func (*Controller) CheckAlert ¶ added in v0.0.6
func (c *Controller) CheckAlert(registry *tables.SensorRegistry) ([]tables.Alert, error)
func (*Controller) Close ¶
func (c *Controller) Close() error
func (*Controller) ConfirmAccount ¶ added in v0.0.6
func (c *Controller) ConfirmAccount(emailCode string) error
func (*Controller) CreateAlert ¶
func (*Controller) CreateStation ¶
func (*Controller) DeleteAlert ¶
func (*Controller) DeleteSensors ¶
func (*Controller) DeleteStation ¶
func (*Controller) Historical ¶
func (c *Controller) Historical(filter *HistoricalFilter) ([]tables.SensorRegistry, error)
func (*Controller) PushRegistry ¶ added in v0.0.6
func (c *Controller) PushRegistry(session *tables.Station, registries []tables.SensorRegistry) (err error)
func (*Controller) QueryAccount ¶
func (*Controller) QueryManyAlert ¶
func (*Controller) QueryManyStation ¶
func (*Controller) QueryOneAlert ¶
func (*Controller) QueryStationAPIKey ¶ added in v0.0.14
func (*Controller) QueryStationNoAPIKey ¶ added in v0.0.14
func (*Controller) RequestConfirmation ¶ added in v0.0.6
func (c *Controller) RequestConfirmation(session *tables.User) (string, error)
func (*Controller) RequestResetPassword ¶ added in v0.0.14
func (c *Controller) RequestResetPassword(account *tables.User) (string, error)
func (*Controller) ResetPassword ¶ added in v0.0.14
func (c *Controller) ResetPassword(resetCode string, newPassword string) error
func (*Controller) SendMessage ¶ added in v0.0.6
func (c *Controller) SendMessage(message *tables.Message) error
func (*Controller) UpdateAccount ¶
func (c *Controller) UpdateAccount(session, details *tables.User, password string) error
Update account user should have the Password set, the details to update
func (*Controller) UpdateAlert ¶
func (*Controller) UpdatePassword ¶ added in v0.0.14
func (c *Controller) UpdatePassword(session *tables.User, currentPassword, newPassword string) error
func (*Controller) UpdateStation ¶
type HistoricalFilter ¶
type MailOptions ¶ added in v0.0.6
Source Files ¶
Click to show internal directories.
Click to hide internal directories.