Documentation ¶
Index ¶
- Constants
- func ActiveSubscriber(c *gin.Context)
- func ArchiveGet(c *gin.Context)
- func CommentReadAll(c *gin.Context)
- func CreateXMLSitemap()
- func GetUnSubcribeUrl(subscriber *models.Subscriber) (string, error)
- func HandleMessage(c *gin.Context, message string)
- func SubscriberIndex(c *gin.Context)
- func UnSubscribe(c *gin.Context)
- func WriteJSON(ctx *gin.Context, h gin.H)
- type BaseApi
- func (b *BaseApi) AdminUser(ctx *gin.Context) (*models.User, error)
- func (b *BaseApi) ClientUser(ctx *gin.Context) (*models.User, error)
- func (b *BaseApi) CurrentUser(c *gin.Context, env string) (*models.User, error)
- func (b *BaseApi) DefaultNoticeMailHtml(subject, body string) error
- func (b *BaseApi) GetSessionValue(ctx *gin.Context, key string, isDelete bool) (value interface{}, err error)
- func (b *BaseApi) Handle404(c *gin.Context)
- func (b *BaseApi) HandleMessage(c *gin.Context, message string)
- func (b *BaseApi) HandlerError(message string, err error) bool
- func (b *BaseApi) OperationSession(ctx *gin.Context, Key string, value interface{}) error
- func (b *BaseApi) RenderComments(h gin.H) gin.H
- func (b *BaseApi) RenderHtml(ctx *gin.Context, path string, h gin.H)
- func (b *BaseApi) SendMailHtml(to, subject, body string) error
- func (b *BaseApi) WriteJSON(ctx *gin.Context, h gin.H)
- type CommentApi
- type IBaseApi
- type SubscribeApi
Constants ¶
View Source
const ( SESSION_KEY = "_session_UserID" // session key CONTEXT_USER_KEY = "User" // context user key SESSION_CAPTCHA = "GIN_CAPTCHA" // captcha session key )
Variables ¶
This section is empty.
Functions ¶
func ActiveSubscriber ¶
func ArchiveGet ¶
func CommentReadAll ¶
func CreateXMLSitemap ¶
func CreateXMLSitemap()
func GetUnSubcribeUrl ¶
func GetUnSubcribeUrl(subscriber *models.Subscriber) (string, error)
func HandleMessage ¶
func SubscriberIndex ¶
func UnSubscribe ¶
Types ¶
type BaseApi ¶
type BaseApi struct { }
func (*BaseApi) CurrentUser ¶
@title: 查询当前用户
func (*BaseApi) DefaultNoticeMailHtml ¶
系统默认推送方式
func (*BaseApi) GetSessionValue ¶
func (*BaseApi) HandlerError ¶
处理共同错误信息
func (*BaseApi) OperationSession ¶
操作对于的session
func (*BaseApi) RenderHtml ¶
render html
type CommentApi ¶
type CommentApi struct {
*BaseApi
}
func (*CommentApi) CommentDelete ¶
func (comm *CommentApi) CommentDelete(c *gin.Context)
func (*CommentApi) CommentPost ¶
func (comm *CommentApi) CommentPost(c *gin.Context)
func (*CommentApi) CommentRead ¶
func (comm *CommentApi) CommentRead(c *gin.Context)
type SubscribeApi ¶
type SubscribeApi struct {
*BaseApi
}
func (*SubscribeApi) Subscribe ¶
func (s *SubscribeApi) Subscribe(c *gin.Context)
func (*SubscribeApi) SubscribeGet ¶
func (s *SubscribeApi) SubscribeGet(c *gin.Context)
func (*SubscribeApi) SubscriberPost ¶
func (s *SubscribeApi) SubscriberPost(c *gin.Context)
邮箱为空时,发送给所有订阅者
Click to show internal directories.
Click to hide internal directories.