Documentation ¶
Index ¶
- func MarshalCreateResponse(res *usr_s.User, w http.ResponseWriter)
- func MarshalDetailResponse(res *usr_s.User, w http.ResponseWriter)
- func MarshalListResponse(res *sub_s.UserPaginationListResult, w http.ResponseWriter)
- func MarshalOperationCreateCommentResponse(res *sub_s.User, w http.ResponseWriter)
- func MarshalOperationStarResponse(res *sub_s.User, w http.ResponseWriter)
- func MarshalUpdateResponse(res *usr_s.User, w http.ResponseWriter)
- func UnmarshalCreateRequest(ctx context.Context, r *http.Request) (*usr_c.CustomerCreateRequestIDO, error)
- func UnmarshalUpdateRequest(ctx context.Context, r *http.Request) (*usr_s.User, error)
- func ValidateCreateRequest(dirtyData *usr_c.CustomerCreateRequestIDO) error
- func ValidateOperationCreateCommentRequest(dirtyData *CustomerOperationCreateCommentRequest) error
- func ValidateOperationStarRequest(dirtyData *CustomerOperationStarRequest) error
- func ValidateUpdateRequest(dirtyData *usr_s.User) error
- type CustomerOperationCreateCommentRequest
- type CustomerOperationStarRequest
- type Handler
- func (h *Handler) ArchiveByID(w http.ResponseWriter, r *http.Request, id string)
- func (h *Handler) Create(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteByID(w http.ResponseWriter, r *http.Request, id string)
- func (h *Handler) GetByID(w http.ResponseWriter, r *http.Request, id string)
- func (h *Handler) List(w http.ResponseWriter, r *http.Request)
- func (h *Handler) OperationCreateComment(w http.ResponseWriter, r *http.Request)
- func (h *Handler) OperationStar(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateByID(w http.ResponseWriter, r *http.Request, id string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalCreateResponse ¶
func MarshalCreateResponse(res *usr_s.User, w http.ResponseWriter)
func MarshalDetailResponse ¶
func MarshalDetailResponse(res *usr_s.User, w http.ResponseWriter)
func MarshalListResponse ¶
func MarshalListResponse(res *sub_s.UserPaginationListResult, w http.ResponseWriter)
func MarshalOperationCreateCommentResponse ¶
func MarshalOperationCreateCommentResponse(res *sub_s.User, w http.ResponseWriter)
func MarshalOperationStarResponse ¶
func MarshalOperationStarResponse(res *sub_s.User, w http.ResponseWriter)
func MarshalUpdateResponse ¶
func MarshalUpdateResponse(res *usr_s.User, w http.ResponseWriter)
func UnmarshalCreateRequest ¶
func UnmarshalUpdateRequest ¶
func ValidateCreateRequest ¶
func ValidateCreateRequest(dirtyData *usr_c.CustomerCreateRequestIDO) error
func ValidateOperationCreateCommentRequest ¶
func ValidateOperationCreateCommentRequest(dirtyData *CustomerOperationCreateCommentRequest) error
func ValidateOperationStarRequest ¶
func ValidateOperationStarRequest(dirtyData *CustomerOperationStarRequest) error
func ValidateUpdateRequest ¶
Types ¶
type CustomerOperationCreateCommentRequest ¶
type CustomerOperationCreateCommentRequest struct { UserID primitive.ObjectID `bson:"user_id" json:"user_id"` Content string `bson:"content" json:"content"` }
type CustomerOperationStarRequest ¶
type CustomerOperationStarRequest struct {
CustomerID primitive.ObjectID `bson:"customer_id" json:"customer_id"`
}
type Handler ¶
type Handler struct { Logger *slog.Logger Controller customer_c.CustomerController }
Handler Creates http request handler
func NewHandler ¶
func NewHandler(loggerp *slog.Logger, c customer_c.CustomerController) *Handler
NewHandler Constructor
func (*Handler) ArchiveByID ¶
func (*Handler) DeleteByID ¶
func (*Handler) OperationCreateComment ¶
func (h *Handler) OperationCreateComment(w http.ResponseWriter, r *http.Request)
func (*Handler) OperationStar ¶
func (h *Handler) OperationStar(w http.ResponseWriter, r *http.Request)
func (*Handler) UpdateByID ¶
Click to show internal directories.
Click to hide internal directories.