working commit

This commit is contained in:
2026-02-12 12:00:17 +02:00
parent ae15bddb15
commit b279687623
20 changed files with 639 additions and 192 deletions
+14 -29
View File
@@ -10,38 +10,23 @@
package descr
const (
GrantModifyUsers = "modifyUsers"
GrantModifyDatabase = "modifyDatabase"
GrantModifyArtefact = "modifyArtefact"
GrantModifyDummy = "modifyDummy"
)
type Account struct {
ID string `json:"id" db:"id"`
Username string `json:"username" db:"username"`
Passhash string `json:"passhash" db:"passhash"`
Disabled bool `json:"disabled" db:"disabled"`
CreatedAt string `json:"createdAt" db:"created_at"`
UpdatedAt string `json:"updatedAt,omitempty" db:"updated_at"`
}
type Grant struct {
ID string `json:"id" db:"id"`
AccountID string `json:"accountID" db:"account_id"`
Operation string `json:"operation" db:"operation"`
Username string `json:"username" db:"username"`
Passhash string `json:"passhash" db:"passhash"`
Disabled bool `json:"disabled" db:"disabled"`
CreatedAt string `json:"createdAt" db:"created_at"`
UpdatedAt string `json:"updatedAt" db:"updated_at"`
CreatedBy string `json:"createdBy" db:"created_by"`
UpdatedBy string `json:"updatedBy" db:"updated_by"`
}
type GrantShortDescr struct {
Operation string `json:"operation"`
CreatedAt string `json:"createdAt"`
}
type AccountShortDescr struct {
Username string `json:"username"`
Disabled bool `json:"disabled"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt,omitempty"`
Grants []GrantShortDescr `json:"grants"`
type AccountShort struct {
Username string `json:"username"`
Disabled bool `json:"disabled"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
CreatedBy string `json:"createdBy"`
UpdatedBy string `json:"updatedBy"`
Grants []GrantShort `json:"grants"`
}