domain

package
v0.0.0-...-3810be4 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	ID        uint   `gorm:"primaryKey"`
	Email     string `gorm:"unique;not null" validate:"email"`
	Password  string `gorm:"not null" validate:"min=8"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt time.Time
}

type JWTError

type JWTError struct {
	Code    int
	Message string
}

JWTError represents an error related to JWT token processing

func (*JWTError) Error

func (e *JWTError) Error() string

type Product

type Product struct {
	ID          uint `gorm:"primaryKey"`
	Name        string
	Description string
	Price       float64
}

type SignedDetails

type SignedDetails struct {
	ID     int    `json:"id"`
	Email  string `json:"email"`
	Role   string `json:"role"`
	Source string `json:"source"`
	Exp    int64  `json:"exp"`

	// Custom claims as per application needs
	jwt.StandardClaims
}

SignedDetails represents the JWT token details

type User

type User struct {
	ID        uint   `gorm:"primaryKey"`
	Email     string `gorm:"unique;not null" validate:"email"`
	Password  string `gorm:"not null" validate:"min=8"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt time.Time
}

Jump to

Keyboard shortcuts

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