httptransport

package
v0.0.0-...-53e80a7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

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 MarshalUpdateResponse

func MarshalUpdateResponse(res *bulletin_s.Bulletin, w http.ResponseWriter)

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) Create

func (h *Handler) Create(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteByID

func (h *Handler) DeleteByID(w http.ResponseWriter, r *http.Request, id string)

func (*Handler) GetByID

func (h *Handler) GetByID(w http.ResponseWriter, r *http.Request, id string)

func (*Handler) PaginatedList

func (h *Handler) PaginatedList(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateByID

func (h *Handler) UpdateByID(w http.ResponseWriter, r *http.Request, id string)

Jump to

Keyboard shortcuts

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