package
0.0.26-beta-rc.4
Repository: https://github.com/mikmuellerdev/smarthome.git
Documentation: pkg.go.dev

# Functions

Activates all jobs saved in the database, will be used when the server was restarted If a non-critical error occurs, for example the failure to setup a job, it will be returned This function will not cancel directly if an error occurs in order to preserve the automation system's uptime.
Returns (sunrise, sunset) based on the provided coordinates which are stored in the server configuration.
Creates a new automation which an according database entry Sets up the scheduler based on the provided hour, minute, and days of the week on which the automation should run.
Stops all jobs in the automation scheduler.
Generates a cron-expression based on the hour, minute, and days on which the automation should run Is used for sending the owner of an automation a notification or for listing a users automations.
Returns a slice which contains the days on which a given cron-expression will run Used for generating a new cron-expression when the timing function is set to either `sunrise` or `sunset`.
Given an username and id, it returns a matching automation, whether it exists and an error.
Returns a slice of automations which a given user has set up Does not check the validity of the user.
Initializes the scheduler.
No description provided by the author
Validates a given cron-expression, returns false if the given cron-expression is invalid.
Changes the metadata of a given automation, then restarts it so it uses the updated values such as execution time Is also used after an automation with non-normal timing has been added.
Removes an automation from the database and prevents its further execution.

# Structs

No description provided by the author
No description provided by the author