Discover Packages
github.com/chenchengwork/go-web-framework
models
package
Version:
v0.0.0-...-0b81e36
Opens a new window with list of versions in this module.
Published: Nov 3, 2020
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
CheckAuth checks if authentication information exists
CloseDB closes database connection (unnecessary)
Setup initializes the database instance
type Auth struct {
ID int `gorm:"primary_key" json:"id"`
Username string `json:"username"`
Password string `json:"password"`
}
type Model struct {
ID int `gorm:"primary_key" json:"id"`
CreatedOn int `json:"created_on"`
ModifiedOn int `json:"modified_on"`
DeletedOn int `json:"deleted_on"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.