models

package
v0.0.0-...-e064f5a Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	CreatedAt   sql.NullTime   `json:"createdAt,omitempty" gorm:"autoCreateTime;index"`
	UpdatedAt   sql.NullTime   `json:"updatedAt,omitempty" gorm:"autoUpdateTime;index"`
	DeletedAt   gorm.DeletedAt `json:"deletedAt,omitempty" gorm:"index"`
	Title       string         `json:"title" gorm:"size:127;index"`
	Author      string         `json:"author" gorm:"size:127;index"`
	Description string         `json:"description" gorm:""`
	ID          uint           `json:"id" gorm:"primaryKey"`
}

Book Constructs your Book model under entities.

type BooksResponse

type BooksResponse struct {
	Books []Book `json:"books"`
}

type JwtResources

type JwtResources struct {
	JwtVerifyKey     crypto.PublicKey
	JwtSignKey       crypto.PrivateKey
	JwtSigningMethod jwt.SigningMethod
	JwtKeyfunc       jwt.Keyfunc
	JwtParser        *jwt.Parser
}

type Resources

type Resources struct {
	LogConfig      logger.Config
	FastHTTPClient *fasthttp.Client
	MainDbConn     *gorm.DB
	LogDbConn      *mongo.Database
	RedisStorage   *redis.Storage
	JwtResources   *JwtResources
	SessConfig     session.Config
}

type User

type User struct {
	ID        string         `json:"id" gorm:"size:32;primaryKey"`
	Password  string         `json:"password" gorm:"size:64"`
	FullName  string         `json:"full_name" gorm:"size:127;index"`
	Address   string         `json:"address" gorm:"type:text"`
	CreatedAt sql.NullTime   `json:"createdAt,omitempty" gorm:"autoCreateTime;index"`
	UpdatedAt sql.NullTime   `json:"updatedAt,omitempty" gorm:"autoUpdateTime;index"`
	DeletedAt gorm.DeletedAt `json:"deletedAt,omitempty" gorm:"index"`
}

type UserResponse

type UserResponse struct {
	helpers.ResponseForm
}

Jump to

Keyboard shortcuts

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