Documentation ¶
Index ¶
- func CheckDomain(domain, websiteId, uid string) bool
- func CheckDomainIsExists(c *gin.Context)
- func CountWebsite(uid int) int
- func CreateWebSiteConfig(c *gin.Context)
- func CreateWebsite(c *gin.Context)
- func DeleteWebsite(c *gin.Context)
- func GetWebsiteById(websiteId int) (*models.ZapWebSite, error)
- func GetWebsiteByServerName(servername string) (*models.ZapWebSite, error)
- func ListWebsite(c *gin.Context)
- func SetWebsiteStatus(c *gin.Context)
- func SetWebsiteStatusByServerName(servername, status string) error
- func UpdateWebsite(c *gin.Context)
- func WebSiteSettings(c *gin.Context)
- type WebSiteService
- func (w *WebSiteService) CheckDomain(domain string) error
- func (w *WebSiteService) CreateWebsite(req webSiteRequest) error
- func (w *WebSiteService) StartWebsite(websiteId int) error
- func (w *WebSiteService) StopWebsite(websiteId int) error
- func (w *WebSiteService) UpdateWebsite(req webSiteRequest) error
- type WebsiteMgr
- func (w *WebsiteMgr) CreateWebsite(website *models.ZapWebSite) error
- func (w *WebsiteMgr) GetNgxConfig(filename string) string
- func (w *WebsiteMgr) GetUserConfig(conf ...string) string
- func (w *WebsiteMgr) GetUserNginxConfDir() string
- func (w *WebsiteMgr) GetUserWebserverConfDir() string
- func (w *WebsiteMgr) GetWebsiteConfFileName() string
- func (w *WebsiteMgr) RemoveWebsite() error
- func (w *WebsiteMgr) RemoveWebsiteConfig(servername string) error
- func (w *WebsiteMgr) RenameWwwRoot(oldpath, newpath string) error
- func (w *WebsiteMgr) SetWwwRoot(www_root string)
- func (w *WebsiteMgr) UpdateWebsite(website *models.ZapWebSite) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDomain ¶
func CheckDomainIsExists ¶
func CreateWebSiteConfig ¶
func CreateWebsite ¶
func DeleteWebsite ¶
func GetWebsiteById ¶
func GetWebsiteById(websiteId int) (*models.ZapWebSite, error)
func GetWebsiteByServerName ¶
func GetWebsiteByServerName(servername string) (*models.ZapWebSite, error)
func ListWebsite ¶
func SetWebsiteStatus ¶
func UpdateWebsite ¶
func WebSiteSettings ¶
Types ¶
type WebSiteService ¶
func NewWebSiteService ¶
func NewWebSiteService(username string, id uint) *WebSiteService
func (*WebSiteService) CheckDomain ¶
func (w *WebSiteService) CheckDomain(domain string) error
func (*WebSiteService) CreateWebsite ¶
func (w *WebSiteService) CreateWebsite(req webSiteRequest) error
func (*WebSiteService) StartWebsite ¶
func (w *WebSiteService) StartWebsite(websiteId int) error
func (*WebSiteService) StopWebsite ¶
func (w *WebSiteService) StopWebsite(websiteId int) error
func (*WebSiteService) UpdateWebsite ¶
func (w *WebSiteService) UpdateWebsite(req webSiteRequest) error
type WebsiteMgr ¶
type WebsiteMgr struct { UserHomeDir string // user home Username string WwwRoot string WwwUser string WwwGroup string WwwUserId int WwwGroupId int ServerName string SiteDirectory string //网站目录 WebSiteId int // models website id WebServerType string // nginx / openresty }
func NewWebSiteMgr ¶
func NewWebSiteMgr(username, serverName string) *WebsiteMgr
func NewWebSiteMgrWithWebSiteId ¶
func NewWebSiteMgrWithWebSiteId(username, serverName string, websiteId int) *WebsiteMgr
func (*WebsiteMgr) CreateWebsite ¶
func (w *WebsiteMgr) CreateWebsite(website *models.ZapWebSite) error
func (*WebsiteMgr) GetNgxConfig ¶
func (w *WebsiteMgr) GetNgxConfig(filename string) string
func (*WebsiteMgr) GetUserConfig ¶
func (w *WebsiteMgr) GetUserConfig(conf ...string) string
func (*WebsiteMgr) GetUserNginxConfDir ¶
func (w *WebsiteMgr) GetUserNginxConfDir() string
func (*WebsiteMgr) GetUserWebserverConfDir ¶
func (w *WebsiteMgr) GetUserWebserverConfDir() string
func (*WebsiteMgr) GetWebsiteConfFileName ¶
func (w *WebsiteMgr) GetWebsiteConfFileName() string
func (*WebsiteMgr) RemoveWebsite ¶
func (w *WebsiteMgr) RemoveWebsite() error
func (*WebsiteMgr) RemoveWebsiteConfig ¶
func (w *WebsiteMgr) RemoveWebsiteConfig(servername string) error
func (*WebsiteMgr) RenameWwwRoot ¶
func (w *WebsiteMgr) RenameWwwRoot(oldpath, newpath string) error
func (*WebsiteMgr) SetWwwRoot ¶
func (w *WebsiteMgr) SetWwwRoot(www_root string)
func (*WebsiteMgr) UpdateWebsite ¶
func (w *WebsiteMgr) UpdateWebsite(website *models.ZapWebSite) error
更新网站
Click to show internal directories.
Click to hide internal directories.