package
0.0.26-beta-rc.4
Repository: https://github.com/mikmuellerdev/smarthome.git
Documentation: pkg.go.dev
# Functions
Adds a new reminder to the database.
No description provided by the author
Add a switchPermission to a given user, admin authentication required Request: `{"username": "x", "switch": "y"}` | Response: Response.
Creates a new user and gives him a provided password Request: `{"username": "x", "password": "y"}`, admin auth required.
Adds a given permission to a given user, admin authentication required If the permission is invalid, a `422` is returned Request: `{"username": "", "permission": ""}` | Response: Response.
Activate or deactivate the entire automation system.
Creates a new camera with the provided metadata.
Creates a new automation.
Creates a new Homescript.
Creates a new generic schedule which runs homescript.
Creates a switch in the database.
Reading system debug information, admin authentication required Todo: read raspberry pi information.
No description provided by the author
Deletes the user's currently saved avatar and sets it to default, authentication required.
No description provided by the author
Deletes a Homescript by its Id, checks if it exists and if the user has permission to delete it.
Deletes a reminder, for example if it's task is finished.
Deletes a room and all its dependencies.
No description provided by the author
Deletes a user given a valid username This also needs to delete any data that depends on this user in terms of a foreign key Admin auth required.
Delete a given notification from the current user.
Triggers deletion of ALL internal server logs, admin authentication required Request: empty | Response: Response.
Triggers deletion of internal server logs which are older than 30 days, admin authentication required Request: empty | Response: Response.
Returns a list of available cameras as JSON to the user, admin authentication is required because such information is confidential.
Returns a list of available switches as JSON to the user, no authentication required.
Returns the user's current avatar as an image, authentication required.
Camera feed and image fetching ///.
Returns a list of strings which represent permissions of the currently logged in user, admin authentication required Request: empty | Response: `["a", "b", "c"]`.
Returns the avatar of any given user.
Returns a list of strings which represent the permissions of an arbitrary user, admin authentication required.
Returns a list of strings which represent the switch permissions of an arbitrary user, admin authentication required.
Returns a uin16 that indicates the number of notifications the current user has, no authentication required.
Returns a list containing notifications of the current user.
Returns a list of power states, no authentication required Request: empty | Response: `[{"switchId": "x", power: false}, {...}]`.
Returns a list of reminders that the current user has added.
Returns a list of all automations set up by the current user.
Only returns cameras to which the user has access to, authentication required.
Returns the user's personal data, auth required.
Returns a list of all schedules set up by the current user.
Only returns switches which the user has access to, authentication required.
Accepts the upload of an image of following allowed formats (png / webp / jpeg / jpg) Image should ideally be in `1:1` aspect ratio, authentication required`.
Runs a healthcheck of most systems on which the appplication relies on, will be used by e.g `Uptime Kuma`, no authentication required.
No description provided by the author
Returns list of all rooms.
Returns a list of logging items in the logging table, admin authentication required.
Returns the list of all available permissions.
Returns a list of homescripts which are owned by the current user.
Returns list of rooms which contain switches that the user is allowed to use.
Returns a list of users and their metadata, admin auth required.
Modifies a existing automation, also restarts the schedule.
No description provided by the author
Modifies the metadata of the current user.
Modifies the metadata of a given homescript.
Modifies a reminder given its id and new metadata.
Modifies the room's name and description.
Modify a generic schedule which already exists.
No description provided by the author
Modifies the metadata of a given user.
API endpoint for manipulating power states and (de) activating sockets, authentication required Permission and switch permission is needed to interact with this endpoint.
Stops, then removes the given automation from the system.
Stops, then removes the given schedule from the system.
Removes a given switch permission from a given user, admin authentication required Request: `{"username": "x", "switch": "y"}` | Response: Response.
Todo: unit tests for some of the subfunction Removes a given permission from a user, admin authentication required Request: `{"username": "x", "permission": "y"}` | Response: Response.
No description provided by the author
Runs any given Homescript as a string.
Allows the user to change whether they want to use the light or dark theme.
Set if the user scheduler is enabled or disabled.
No description provided by the author
Set if the user scheduler is enabled or disabled.
Admin endpoints for changing the servers global configuration.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author