Create initial user if User table is empty. Also make model.QueryOptions compatible with rest.QueryOptions

This commit is contained in:
Deluan
2020-01-19 22:36:15 -05:00
parent 2ab0cecd48
commit 491bfb1f69
11 changed files with 130 additions and 38 deletions
+6
View File
@@ -12,3 +12,9 @@ type User struct {
CreatedAt time.Time
UpdatedAt time.Time
}
type UserRepository interface {
CountAll(...QueryOptions) (int64, error)
Get(id string) (*User, error)
Put(*User) error
}