Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthSchema ¶
type AuthSchema struct { Email string `json:"email" valid:"required~Email is required"` Password string `json:"password" valid:"length(4|16)~Password length should not be less than 4"` }
AuthSchema defines structure of auth information
type DataPayload ¶
DataPayload structure for error responses
type MalformedRequest ¶
type MalformedRequest struct {
// contains filtered or unexported fields
}
MalformedRequest _
func (*MalformedRequest) Error ¶
func (mr *MalformedRequest) Error() string
type NullString ¶
type NullString struct {
sql.NullString
}
func (*NullString) MarshalJSON ¶
func (value *NullString) MarshalJSON() ([]byte, error)
override MarshalJSON method for custom type NullString
func (*NullString) UnmarshalJSON ¶
func (value *NullString) UnmarshalJSON(b []byte) error
override UnmarshalJSON method for custom type NullString
type Route ¶
type Route struct { Name string Method string Pattern string HandlerFunc http.HandlerFunc }
Route defines a structure for routes
type UserReturnData ¶
type UserReturnData struct { ID string `json:"id"` Username string `json:"username"` Email string `json:"email"` Role string `json:"role"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Token string `json:"token"` }
UserReturnData defines structure of user information to return
type UserSchema ¶
type UserSchema struct { ID string `json:"id"` Username string `json:"username"` Email string `json:"email"` Password string `json:"password"` Role string `json:"role"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
UserSchema defines structure of user information
type UsernameUpdateSchema ¶
type UsernameUpdateSchema struct {
Username string `json:"username" valid:"required~Username is blank"`
}
UsernameUpdateSchema defines structure of user information
Click to show internal directories.
Click to hide internal directories.