fin-check-api/types/types.go

29 lines
806 B
Go
Raw Normal View History

2024-08-02 22:36:25 +02:00
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="`
}
2024-08-03 07:06:07 +02:00
type Message struct {
Message string `json:"message" example:"Success!"`
}
2024-08-02 22:36:25 +02:00
type ErrorResponse struct {
Message string `json:"message" example:"Error: you stink"`
}
2024-08-03 07:06:07 +02:00
type DbCard struct {
Name string `json:"name" example:"CreditCard"`
Value uint64 `json:"value" example:"1000"`
HaveCreditLine bool `json:"have_credit_line" example:"true"`
CreditLine uint64 `json:"credit_line" example:"500000"`
}