mirror of
https://github.com/kaaninchen/Laterna.git
synced 2026-09-17 19:12:48 +00:00
feat: a lot
i did a lot of work, and i also forgot to add commits regularly. I added the controller routes to create and delete controllers, improved error handling und improved the authentification process. I'm gonna add an websocket next and then I should be hopefully done with the foundations of this project. I may also add anviewControllers route which respons with every available controller
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type HTTPConfig struct {
|
||||
AdminToken string `json:"adminToken"`
|
||||
@@ -15,10 +17,10 @@ type Config struct {
|
||||
VerboseLogging bool `json:"verboseLogging"`
|
||||
}
|
||||
|
||||
type HTTPError struct {
|
||||
type HTTPResponse struct {
|
||||
Timestamp string `json:"timestamp"`
|
||||
Status int `json:"status"`
|
||||
Error string `json:"error"`
|
||||
Text string `json:"text"`
|
||||
Message string `json:"message"`
|
||||
Path string `json:"path"`
|
||||
}
|
||||
@@ -32,3 +34,7 @@ type LampState struct {
|
||||
type LampUpdateRequest struct {
|
||||
Color string `json:"color"`
|
||||
}
|
||||
|
||||
type ControllerRequests struct {
|
||||
ID int `json:"ID"`
|
||||
}
|
||||
Reference in New Issue
Block a user