model

package
v0.0.0-...-54db4b9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID       int    `json:"id" validate:"numeric,gte=0"`
	Name     string `json:"name" validate:"required,min=5,max=30"`
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password,omitempty"`
	Age      int    `json:"age" validate:"required,numeric,gte=0,lte=130"`
	Active   bool   `json:"active"`
}

type UserLogin

type UserLogin struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type UserToken

type UserToken struct {
	UserID string `json:"id"`
	Name   string `json:"name"`
	Email  string `json:"email"`
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL