Documentation ¶
Index ¶
- func AutoMigrate(model interface{})
- func CheckToken(token string) int64
- func CreateBackup(path string)
- func DeleteToken(token string) error
- func GenerateJWT(name string) (string, error)
- func Init()
- type Auth
- type AuthToken
- type Cert
- type ConfigBackup
- type ConfigBackupListItem
- type Curd
- func (c *Curd) Add(value interface{}) (err error)
- func (c *Curd) Delete(value interface{}, conds ...interface{}) (err error)
- func (c *Curd) Edit(orig interface{}, new interface{}) (err error)
- func (c *Curd) First(dest interface{}, conds ...interface{}) (err error)
- func (c *Curd) GetList(dest interface{}) (err error)
- type JWTClaims
- type Log
- type Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrate ¶
func AutoMigrate(model interface{})
func CheckToken ¶
func CreateBackup ¶
func CreateBackup(path string)
func DeleteToken ¶
func GenerateJWT ¶
Types ¶
type ConfigBackup ¶
type ConfigBackup struct { Model Name string `json:"name"` FilePath string `json:"file_path"` Content string `json:"content" gorm:"type:text"` }
func GetBackup ¶
func GetBackup(id int) (config ConfigBackup)
type ConfigBackupListItem ¶
type ConfigBackupListItem struct { Model Name string `json:"name"` FilePath string `json:"file_path"` }
func GetBackupList ¶
func GetBackupList(path string) (configs []ConfigBackupListItem)
type JWTClaims ¶
type JWTClaims struct { Name string `json:"name"` jwt.StandardClaims }
Click to show internal directories.
Click to hide internal directories.