Files
tecamino-json_data/models/get.go
2025-04-26 23:14:50 +02:00

28 lines
586 B
Go

package models
import "github.com/google/uuid"
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"`
}
func (g *Get) ByPath(path string, query *Query) {
g.Path = path
if query != nil {
g.Query = query
}
}
func (g *Get) ByUuid(uid string, query *Query) {
g.Uuid = uuid.MustParse(uid)
if query != nil {
g.Query = query
}
}