Documentation ¶
Overview ¶
Package http is a generated GoMock package.
Index ¶
- Variables
- func CustomHTTPErrorHandler(err error, c echo.Context)
- func KhumuRequestLog(handlerFunc echo.HandlerFunc) echo.HandlerFunc
- func NewEcho(commentUC usecase.CommentUseCaseInterface, ...) *echo.Echo
- type Authenticator
- type CommentResponse
- type CommentRouter
- func (r *CommentRouter) Create(c echo.Context) error
- func (r *CommentRouter) Delete(c echo.Context) error
- func (r *CommentRouter) Get(c echo.Context) error
- func (r *CommentRouter) GetCommentCount(c echo.Context) error
- func (r *CommentRouter) LikeToggle(c echo.Context) error
- func (r *CommentRouter) List(c echo.Context) error
- func (r *CommentRouter) Update(c echo.Context) error
- type CommentsResponse
- type CustomBinder
- type GetInfoAboutArticleReq
- type GetInfoAboutArticleResp
- type LikeCommentResponse
- type RootRouter
Constants ¶
This section is empty.
Variables ¶
View Source
var KhumuJWTConfig = middleware.JWTConfig{ Skipper: func(c echo.Context) bool { return false }, SigningKey: []byte(os.Getenv("KHUMU_SECRET")), SigningMethod: "HS256", ContextKey: "user", TokenLookup: "header:" + echo.HeaderAuthorization, AuthScheme: "Bearer", Claims: jwt.MapClaims{}, }
Functions ¶
func CustomHTTPErrorHandler ¶
func CustomHTTPErrorHandler(err error, c echo.Context)
HTTPErrorHandler 참고 https://echo.labstack.com/guide/error-handling/
func KhumuRequestLog ¶
func KhumuRequestLog(handlerFunc echo.HandlerFunc) echo.HandlerFunc
application/json 요청인 경우 바디를 출력.
func NewEcho ¶
func NewEcho(commentUC usecase.CommentUseCaseInterface, likeUC usecase.LikeCommentUseCaseInterface, repo *ent.Client) *echo.Echo
Types ¶
type Authenticator ¶
func (*Authenticator) Authenticate ¶
func (a *Authenticator) Authenticate(handlerFunc echo.HandlerFunc) echo.HandlerFunc
func (*Authenticator) KhumuBasicAuth ¶
func (a *Authenticator) KhumuBasicAuth(username, password string, c echo.Context) (bool, error)
type CommentResponse ¶
type CommentResponse struct { Data *data.CommentOutput `json:"data"` //this contains any format of comments Message string `json:"message"` }
type CommentRouter ¶
type CommentRouter struct { *echo.Group // contains filtered or unexported fields }
func NewCommentRouter ¶
func NewCommentRouter(root *RootRouter, commentUC usecase.CommentUseCaseInterface, likeUC usecase.LikeCommentUseCaseInterface) *CommentRouter
func (*CommentRouter) Create ¶
func (r *CommentRouter) Create(c echo.Context) error
func (*CommentRouter) Delete ¶
func (r *CommentRouter) Delete(c echo.Context) error
func (*CommentRouter) Get ¶
func (r *CommentRouter) Get(c echo.Context) error
func (*CommentRouter) GetCommentCount ¶
func (r *CommentRouter) GetCommentCount(c echo.Context) error
해당 Article에 대해 필요한 댓글 정보들
func (*CommentRouter) LikeToggle ¶
func (r *CommentRouter) LikeToggle(c echo.Context) error
func (*CommentRouter) List ¶
func (r *CommentRouter) List(c echo.Context) error
func (*CommentRouter) Update ¶
func (r *CommentRouter) Update(c echo.Context) error
type CommentsResponse ¶
type CommentsResponse struct { Data []*data.CommentOutput `json:"data"` //this contains any format of comments Message string `json:"message"` }
type CustomBinder ¶
type CustomBinder struct{}
func (*CustomBinder) Bind ¶
func (cb *CustomBinder) Bind(i interface{}, c echo.Context) (err error)
type GetInfoAboutArticleReq ¶
type GetInfoAboutArticleReq struct {
Article int `json:"article"`
}
type GetInfoAboutArticleResp ¶
type GetInfoAboutArticleResp struct {
CommentCount int `json:"comment_count"`
}
type LikeCommentResponse ¶
type RootRouter ¶
type RootRouter struct{ *echo.Group }
의존성 주입시에 root router를 판별하기 위해 임베딩
func NewRootRouter ¶
func NewRootRouter(echoServer *echo.Echo, repo *ent.Client) *RootRouter
Click to show internal directories.
Click to hide internal directories.