Documentation ¶
Index ¶
- Constants
- 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 CertDomains
- 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 ¶
View Source
const ( AutoCertEnabled = 1 AutoCertDisabled = -1 )
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 Name string `json:"name"` Domains pq.StringArray `json:"domains" gorm:"type:text[]"` Filename string `json:"filename"` SSLCertificatePath string `json:"ssl_certificate_path"` SSLCertificateKeyPath string `json:"ssl_certificate_key_path"` AutoCert int `json:"auto_cert"` Log string `json:"log"` }
func FirstCertByID ¶
func FirstOrCreateCert ¶
func GetAutoCertList ¶
func GetAutoCertList() (c []*Cert)
func GetCertList ¶
type CertDomains ¶
type CertDomains []string
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 ¶
type DataList struct { Data interface{} `json:"data"` Pagination Pagination `json:"pagination,omitempty"` }
func GetListWithPagination ¶
func GetUserList ¶
type JWTClaims ¶
type JWTClaims struct { Name string `json:"name"` jwt.StandardClaims }
Click to show internal directories.
Click to hide internal directories.