add comments and new parameter id for client request order

This commit is contained in:
Adrian Zuercher
2025-05-04 20:55:58 +02:00
parent c7154f0779
commit e3487eb340
15 changed files with 119 additions and 79 deletions

View File

@@ -2,16 +2,18 @@ package models
import "github.com/google/uuid"
// Get model
type Get struct {
Uuid uuid.UUID `json:"uuid"`
Path string `json:"path"`
Query *Query `json:"query,omitempty"`
Drivers *Drivers `json:"driver,omitempty"`
Type Type `json:"type,omitempty"`
Value any `json:"value,omitempty"`
Rights Rights `json:"rights,omitempty"`
Uuid uuid.UUID `json:"uuid"` // universally unique identifier
Path string `json:"path"` // dbm path
Query *Query `json:"query,omitempty"` // query paramater
Drivers *Drivers `json:"driver,omitempty"` // assigned drivers
Type Type `json:"type,omitempty"` // dbm datatype
Value any `json:"value,omitempty"` // dbm value
Rights Rights `json:"rights,omitempty"` // dbm read /write rights
}
// search dbm datapoints by path
func (g *Get) ByPath(path string, query *Query) {
g.Path = path
if query != nil {
@@ -19,6 +21,7 @@ func (g *Get) ByPath(path string, query *Query) {
}
}
// search dbm datapoints by uuid
func (g *Get) ByUuid(uid string, query *Query) {
g.Uuid = uuid.MustParse(uid)
if query != nil {