Move types to different folder

This commit is contained in:
qowevisa 2024-08-02 23:36:25 +03:00
parent 1e469dda3c
commit 7a54ea796e
2 changed files with 17 additions and 7 deletions

View File

@ -1,7 +0,0 @@
package main
type Account struct {
}
type ErrorResponse struct {
}

17
types/types.go Normal file
View File

@ -0,0 +1,17 @@
package types
// User struct for requests
type User struct {
Username string `json:"username" binding:"required" example:"testUser"`
Password string `json:"password" binding:"required" example:"strongPassLol"`
}
// User Account
type Account struct {
ID uint `json:"id" example:"1"`
Token string `json:"token" example:"Fvs-MnxiEs5dnqMp2mSDIJigPbiIUs6Snk1xxiqPmUc="`
}
type ErrorResponse struct {
Message string `json:"message" example:"Error: you stink"`
}