Move types to different folder
This commit is contained in:
parent
1e469dda3c
commit
7a54ea796e
|
@ -1,7 +0,0 @@
|
|||
package main
|
||||
|
||||
type Account struct {
|
||||
}
|
||||
|
||||
type ErrorResponse struct {
|
||||
}
|
17
types/types.go
Normal file
17
types/types.go
Normal 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"`
|
||||
}
|
Loading…
Reference in New Issue
Block a user