web

package
v0.0.0-...-02d2a03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleHandler

type ArticleHandler struct {
	// contains filtered or unexported fields
}

func NewArticleHandler

func NewArticleHandler(svc service.ArticleService) *ArticleHandler

func (*ArticleHandler) Detail

func (handler *ArticleHandler) Detail(c *gin.Context)

func (*ArticleHandler) Edit

func (handler *ArticleHandler) Edit(c *gin.Context)

func (*ArticleHandler) List

func (handler *ArticleHandler) List(c *gin.Context)

func (*ArticleHandler) Pub

func (handler *ArticleHandler) Pub(c *gin.Context)

func (*ArticleHandler) Publish

func (handler *ArticleHandler) Publish(c *gin.Context)

func (*ArticleHandler) RegisterRoutes

func (handler *ArticleHandler) RegisterRoutes(server *gin.Engine)

func (*ArticleHandler) WithDraw

func (handler *ArticleHandler) WithDraw(c *gin.Context)

type ArticleReq

type ArticleReq struct {
	Title   string `json:"title"`
	Content string `json:"content"`
	Id      int64  `json:"id"`
}

type ArticleVo

type ArticleVo struct {
	Id       int64  `json:"id"`
	Title    string `json:"title"`
	Content  string `json:"content"`
	Abstract string `json:"abstract"`
	Author   string `json:"author"`
	Status   int    `json:"status"`
	CTime    int64  `json:"ctime"`
	UTime    int64  `json:"utime"`
}

func ConvertToArtVo

func ConvertToArtVo(articles []domain.Article) []ArticleVo

type Result

type Result struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data any    `json:"data"`
}

type UserHandler

type UserHandler struct {
	// contains filtered or unexported fields
}

func NewUserHandler

func NewUserHandler(svc service.UserService, codeSvc service.CodeService) *UserHandler

func (*UserHandler) Edit

func (handler *UserHandler) Edit(c *gin.Context)

func (*UserHandler) Login

func (handler *UserHandler) Login(c *gin.Context)

func (*UserHandler) LoginJWT

func (handler *UserHandler) LoginJWT(c *gin.Context)

func (*UserHandler) LoginSMS

func (handler *UserHandler) LoginSMS(c *gin.Context)

func (*UserHandler) RefreshJWT

func (handler *UserHandler) RefreshJWT(c *gin.Context)

func (*UserHandler) RegisterRoutes

func (handler *UserHandler) RegisterRoutes(server *gin.Engine)

func (*UserHandler) SendCode

func (handler *UserHandler) SendCode(c *gin.Context)

func (*UserHandler) Signup

func (handler *UserHandler) Signup(c *gin.Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL