generated from PackagrIO/goweb-template
-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d07157
commit 1bcba6e
Showing
35 changed files
with
573 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
package auth | ||
|
||
import ( | ||
"github.com/fastenhealth/fasten-onprem/backend/pkg/models" | ||
) | ||
|
||
type UserMetadata struct { | ||
FullName string `json:"full_name"` | ||
Picture string `json:"picture"` | ||
Email string `json:"email"` | ||
FullName string `json:"full_name"` | ||
Picture string `json:"picture"` | ||
Email string `json:"email"` | ||
Role models.Role `json:"role"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package _20240813222836 | ||
|
||
import ( | ||
"github.com/fastenhealth/fasten-onprem/backend/pkg/models" | ||
) | ||
|
||
type Role string | ||
|
||
const ( | ||
RoleUser Role = "user" | ||
RoleAdmin Role = "admin" | ||
) | ||
|
||
type User struct { | ||
models.ModelBase | ||
FullName string `json:"full_name"` | ||
Username string `json:"username" gorm:"unique"` | ||
Password string `json:"password"` | ||
|
||
//additional optional metadata that Fasten stores with users | ||
Picture string `json:"picture"` | ||
Email string `json:"email"` | ||
Role Role `json:"role"` | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.