Documentation ¶
Index ¶
- Variables
- func Compress(files []*os.File, dest string) error
- func DeCompress(zipFile, dest string) error
- func GenerateID() string
- func GetAuthModel(ctx *gin.Context) request.AuthModel
- func InitJWT()
- func InitPostgres(config cfg.PostgresConfiguration, debug bool) (db *gorm.DB, err error)
- func RandKey(ln int) string
- func Return(ctx *gin.Context, data interface{})
- type Lock
- type RWLock
- type RWUnlock
- type UniversalReturn
- type Unlock
Constants ¶
This section is empty.
Variables ¶
View Source
var JWT *jwt.JWT
View Source
var Validate *validator.Validate
Functions ¶
func GenerateID ¶
func GenerateID() string
func InitPostgres ¶
InitPostgres ...
Types ¶
type UniversalReturn ¶
type UniversalReturn struct { RequestID string `json:"request_id,omitempty"` // 请求ID Code string `json:"code"` // 状态码 0 正常 Message string `json:"message,omitempty"` // 基础消息 Data interface{} `json:"data,omitempty"` // 数据 }
UniversalReturn 通用返回
Click to show internal directories.
Click to hide internal directories.