Documentation ¶
Index ¶
- func MarshalCreateResponse(res *bulletin_s.Bulletin, w http.ResponseWriter)
- func MarshalDetailResponse(res *bulletin_s.Bulletin, w http.ResponseWriter)
- func MarshalListResponse(res *c_s.BulletinPaginationListAndCountResult, w http.ResponseWriter)
- func MarshalUpdateResponse(res *bulletin_s.Bulletin, w http.ResponseWriter)
- func UnmarshalCreateRequest(ctx context.Context, r *http.Request) (*bulletin_c.BulletinCreateRequestIDO, error)
- func UnmarshalUpdateRequest(ctx context.Context, r *http.Request) (*bulletin_c.BulletinUpdateRequestIDO, error)
- func ValidateCreateRequest(dirtyData *bulletin_c.BulletinCreateRequestIDO) error
- type Handler
- 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) PaginatedList(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 *bulletin_s.Bulletin, w http.ResponseWriter)
func MarshalDetailResponse ¶
func MarshalDetailResponse(res *bulletin_s.Bulletin, w http.ResponseWriter)
func MarshalListResponse ¶
func MarshalListResponse(res *c_s.BulletinPaginationListAndCountResult, w http.ResponseWriter)
func MarshalUpdateResponse ¶
func MarshalUpdateResponse(res *bulletin_s.Bulletin, w http.ResponseWriter)
func UnmarshalCreateRequest ¶
func UnmarshalCreateRequest(ctx context.Context, r *http.Request) (*bulletin_c.BulletinCreateRequestIDO, error)
func UnmarshalUpdateRequest ¶
func UnmarshalUpdateRequest(ctx context.Context, r *http.Request) (*bulletin_c.BulletinUpdateRequestIDO, error)
func ValidateCreateRequest ¶
func ValidateCreateRequest(dirtyData *bulletin_c.BulletinCreateRequestIDO) error
Types ¶
type Handler ¶
type Handler struct { Logger *slog.Logger Controller bulletin_c.BulletinController }
Handler Creates http request handler
func NewHandler ¶
func NewHandler(loggerp *slog.Logger, c bulletin_c.BulletinController) *Handler
NewHandler Constructor
func (*Handler) DeleteByID ¶
func (*Handler) PaginatedList ¶
func (h *Handler) PaginatedList(w http.ResponseWriter, r *http.Request)
func (*Handler) UpdateByID ¶
Click to show internal directories.
Click to hide internal directories.