models

package
v0.0.0-...-01f3b1d Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	Success      bool   `json:"status"`
	ResponseCode int    `json:"responseCode"`
	Message      string `json:"message"`
}

Response ... our response structure

type Token

type Token struct {
	UserID uint
	Name   string
	Email  string
	*jwt.StandardClaims
}

Token struct declaration

type TokenResponse

type TokenResponse struct {
	Success      bool   `json:"status"`
	ResponseCode int    `json:"responseCode"`
	Message      string `json:"message"`
	Token        string `json:"token"`
}

TokenResponse ... our response struct with token string

type User

type User struct {
	gorm.Model
	Name     string
	Email    string `gorm:"type:varchar(100);unique_index"`
	Gender   string `json:"Gender"`
	Password string `json:"Password"`
}

User ... user model

Jump to

Keyboard shortcuts

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