Documentation ¶
Overview ¶
THIS FILE IS AUTO GENERATED BY GK-CLI DO NOT EDIT!!
Index ¶
- func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware
- func LoggingMiddleware(logger log.Logger) endpoint.Middleware
- func MakeCancelLikeCommentEndpoint(s service.CommentService) endpoint.Endpoint
- func MakeChangeCommentEndpoint(s service.CommentService) endpoint.Endpoint
- func MakeDeleteCommentEndpoint(s service.CommentService) endpoint.Endpoint
- func MakeGetCommentEndpoint(s service.CommentService) endpoint.Endpoint
- func MakeLikeCommentEndpoint(s service.CommentService) endpoint.Endpoint
- func MakePostCommentEndpoint(s service.CommentService) endpoint.Endpoint
- type CancelLikeCommentRequest
- type CancelLikeCommentResponse
- type ChangeCommentRequest
- type ChangeCommentResponse
- type DeleteCommentRequest
- type DeleteCommentResponse
- type Endpoints
- func (e Endpoints) CancelLikeComment(ctx context.Context, taskId string, cId string) (status bool, errinfo string, data *model.Comment)
- func (e Endpoints) ChangeComment(ctx context.Context, taskId string, cId string, comment string) (status bool, errinfo string, data *model.Comment)
- func (e Endpoints) DeleteComment(ctx context.Context, taskId string, cId string) (status bool, errinfo string, data string)
- func (e Endpoints) GetComment(ctx context.Context, taskId string) (status bool, errinfo string, data []model.Comment)
- func (e Endpoints) LikeComment(ctx context.Context, taskId string, cId string) (status bool, errinfo string, data *model.Comment)
- func (e Endpoints) PostComment(ctx context.Context, taskId string, comment string) (status bool, errinfo string, data *model.Comment)
- type GetCommentRequest
- type GetCommentResponse
- type LikeCommentRequest
- type LikeCommentResponse
- type PostCommentRequest
- type PostCommentResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstrumentingMiddleware ¶
func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware
InstrumentingMiddleware returns an endpoint middleware that records the duration of each invocation to the passed histogram. The middleware adds a single field: "success", which is "true" if no error is returned, and "false" otherwise.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) endpoint.Middleware
LoggingMiddleware returns an endpoint middleware that logs the duration of each invocation, and the resulting error, if any.
func MakeCancelLikeCommentEndpoint ¶
func MakeCancelLikeCommentEndpoint(s service.CommentService) endpoint.Endpoint
MakeCancelLikeCommentEndpoint returns an endpoint that invokes CancelLikeComment on the service.
func MakeChangeCommentEndpoint ¶
func MakeChangeCommentEndpoint(s service.CommentService) endpoint.Endpoint
MakeChangeCommentEndpoint returns an endpoint that invokes ChangeComment on the service.
func MakeDeleteCommentEndpoint ¶
func MakeDeleteCommentEndpoint(s service.CommentService) endpoint.Endpoint
MakeDeleteCommentEndpoint returns an endpoint that invokes DeleteComment on the service.
func MakeGetCommentEndpoint ¶
func MakeGetCommentEndpoint(s service.CommentService) endpoint.Endpoint
MakeGetCommentEndpoint returns an endpoint that invokes GetComment on the service.
func MakeLikeCommentEndpoint ¶
func MakeLikeCommentEndpoint(s service.CommentService) endpoint.Endpoint
MakeLikeCommentEndpoint returns an endpoint that invokes LikeComment on the service.
func MakePostCommentEndpoint ¶
func MakePostCommentEndpoint(s service.CommentService) endpoint.Endpoint
MakePostCommentEndpoint returns an endpoint that invokes PostComment on the service.
Types ¶
type CancelLikeCommentRequest ¶
CancelLikeCommentRequest collects the request parameters for the CancelLikeComment method.
type CancelLikeCommentResponse ¶
type CancelLikeCommentResponse struct { Status bool `json:"status"` Errinfo string `json:"errinfo"` Data *model.Comment `json:"data"` }
CancelLikeCommentResponse collects the response parameters for the CancelLikeComment method.
type ChangeCommentRequest ¶
type ChangeCommentRequest struct { TaskId string `json:"task_id"` CId string `json:"cid"` Comment string `json:"comment"` }
ChangeCommentRequest collects the request parameters for the ChangeComment method.
type ChangeCommentResponse ¶
type ChangeCommentResponse struct { Status bool `json:"status"` Errinfo string `json:"errinfo"` Data *model.Comment `json:"data"` }
ChangeCommentResponse collects the response parameters for the ChangeComment method.
type DeleteCommentRequest ¶
DeleteCommentRequest collects the request parameters for the DeleteComment method.
type DeleteCommentResponse ¶
type DeleteCommentResponse struct { Status bool `json:"status"` Errinfo string `json:"errinfo"` Data string `json:"data"` }
DeleteCommentResponse collects the response parameters for the DeleteComment method.
type Endpoints ¶
type Endpoints struct { GetCommentEndpoint endpoint.Endpoint PostCommentEndpoint endpoint.Endpoint ChangeCommentEndpoint endpoint.Endpoint DeleteCommentEndpoint endpoint.Endpoint LikeCommentEndpoint endpoint.Endpoint CancelLikeCommentEndpoint endpoint.Endpoint }
Endpoints collects all of the endpoints that compose a profile service. It's meant to be used as a helper struct, to collect all of the endpoints into a single parameter.
func New ¶
func New(s service.CommentService, mdw map[string][]endpoint.Middleware) Endpoints
New returns a Endpoints struct that wraps the provided service, and wires in all of the expected endpoint middlewares
func (Endpoints) CancelLikeComment ¶
func (e Endpoints) CancelLikeComment(ctx context.Context, taskId string, cId string) (status bool, errinfo string, data *model.Comment)
CancelLikeComment implements Service. Primarily useful in a client.
func (Endpoints) ChangeComment ¶
func (e Endpoints) ChangeComment(ctx context.Context, taskId string, cId string, comment string) (status bool, errinfo string, data *model.Comment)
ChangeComment implements Service. Primarily useful in a client.
func (Endpoints) DeleteComment ¶
func (e Endpoints) DeleteComment(ctx context.Context, taskId string, cId string) (status bool, errinfo string, data string)
DeleteComment implements Service. Primarily useful in a client.
func (Endpoints) GetComment ¶
func (e Endpoints) GetComment(ctx context.Context, taskId string) (status bool, errinfo string, data []model.Comment)
GetComment implements Service. Primarily useful in a client.
type GetCommentRequest ¶
type GetCommentRequest struct {
TaskId string `json:"task_id"`
}
GetCommentRequest collects the request parameters for the GetComment method.
type GetCommentResponse ¶
type GetCommentResponse struct { Status bool `json:"status"` Errinfo string `json:"errinfo"` Data []model.Comment `json:"data"` }
GetCommentResponse collects the response parameters for the GetComment method.
type LikeCommentRequest ¶
LikeCommentRequest collects the request parameters for the LikeComment method.
type LikeCommentResponse ¶
type LikeCommentResponse struct { Status bool `json:"status"` Errinfo string `json:"errinfo"` Data *model.Comment `json:"data"` }
LikeCommentResponse collects the response parameters for the LikeComment method.
type PostCommentRequest ¶
PostCommentRequest collects the request parameters for the PostComment method.