Adds Request type in requests.go:

This struct will be the basis every possible request. For now it
    contains only the fields of the User request. The idea is that it
    will containt every possible field of any model together with the
    `omitempty` flag so we can marshal only the initialized fields. This
    will deprecate all the ResponseMsg* types that were actually used
    for requests.
This commit is contained in:
smavros 2019-08-13 19:15:31 +02:00
parent 1f4d4c1cf7
commit 487810f148

View file

@ -1,3 +1,10 @@
package common
type KeyModels map[string]interface{}
type Request struct {
Username string `json:"username,omitemtpy"`
Password string `json:"password,omitempty"`
Mail string `json:"mail,omitempty"`
Role string `json:"role,omitempty"`
}