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 DataList
- type JWTClaims
- type Log
- type Model
- type Pagination
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 Cert ¶
type Cert struct { Model Domain string `json:"domain"` SSLCertificatePath string `json:"ssl_certificate_path"` }
func FirstOrCreateCert ¶
func GetAutoCertList ¶
func GetAutoCertList() (c []Cert)
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 DataList ¶ added in v1.5.0
type DataList struct { Data interface{} `json:"data"` Pagination Pagination `json:"pagination,omitempty"` }
func GetListWithPagination ¶ added in v1.5.0
func GetUserList ¶ added in v1.5.0
type JWTClaims ¶
type JWTClaims struct { Name string `json:"name"` jwt.StandardClaims }
Click to show internal directories.
Click to hide internal directories.