Browse Source

cmd moved

master
Bernd-René Predota 5 years ago
parent
commit
2554eb5e35
  1. 0
      cmd/cmd.go
  2. 0
      cmd/cmd_test.go
  3. 3
      main.go
  4. 2
      models/user.go

0
lib/cmd/cmd.go → cmd/cmd.go

0
lib/cmd/cmd_test.go → cmd/cmd_test.go

3
main.go

@ -5,8 +5,8 @@ import (
"strings"
"time"
"git.devices.local/mawas/golang-api-skeleton/cmd"
"git.devices.local/mawas/golang-api-skeleton/lib/cache"
"git.devices.local/mawas/golang-api-skeleton/lib/cmd"
"git.devices.local/mawas/golang-api-skeleton/lib/common"
"git.devices.local/mawas/golang-api-skeleton/lib/config"
"git.devices.local/mawas/golang-api-skeleton/lib/database"
@ -24,7 +24,6 @@ import (
// FIXME how to set unique index for username to make soft deletes possible but disallow duplicates... also how to cache a username which got delete and recerated... user ID would get overwritten, maybe pre/suffix deleted username?
// TODO use badgerdb for permissions? path:[token1, token2...]
// TODO add database loadbalancing feature... so allow more hosts use first as default and other ones as fallback
// TODO add userid and username to repo
// TODO usrid and username for cli user is hardcoded.. no need to live in database
// TODO get-stats cli command... which means unix socket support to communicate with server
// TODO data versioning which will be used as reference from the log, also with predictive analytics for restore which means versioning of reference objects needs to be considered

2
models/user.go

@ -38,7 +38,7 @@ func (user *User) AfterFind(tx *gorm.DB) error {
user.Tokens = append(user.Tokens, user.TokensRef[i].Token.String())
}
if len(user.Tokens) == 0 {
user.Tokens = []string{""}
user.Tokens = []string{}
}
if cc, ok := tx.Get("cache"); ok {
if c, ok := cc.(cache.Cache); ok {

Loading…
Cancel
Save