entity

package
v0.0.0-...-190fc14 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tokens

type Tokens struct {
	AccessToken  string
	RefreshToken string
}

type User

type User struct {
	ID             interface{} `gorm:"primaryKey;autoIncrement" json:"_id,omitempty" bson:"_id,omitempty"`
	Email          string      `gorm:"not null" json:"email" validate:"required"`
	Password       string      `sql:"-" json:"password" validate:"required"`
	HashedPassword string      `json:"-"`
	TokenHash      string      `json:"-"`
	CreatedAt      time.Time   `gorm:"autoCreateTime:milli" json:"-"`
	UpdatedAt      time.Time   `gorm:"autoCreateTime:milli" json:"-"`
}

func (*User) FromJson

func (u *User) FromJson(r io.Reader) error

func (*User) Validate

func (u *User) Validate() error

Jump to

Keyboard shortcuts

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