httptransport

package
v0.0.0-...-9d843bf Latest Latest
Warning

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

Go to latest
Published: Aug 13, 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 *a_s.Attachment, w http.ResponseWriter)

func MarshalDetailResponse

func MarshalDetailResponse(res *sub_s.Attachment, w http.ResponseWriter)

func MarshalListAsSelectOptionResponse

func MarshalListAsSelectOptionResponse(res []*attachment_s.AttachmentAsSelectOption, w http.ResponseWriter)

func MarshalUpdateResponse

func MarshalUpdateResponse(res *sub_s.Attachment, w http.ResponseWriter)

func UnmarshalCreateRequest

func UnmarshalCreateRequest(ctx context.Context, r *http.Request) (*a_c.AttachmentCreateRequestIDO, error)

Types

type Handler

type Handler struct {
	Logger     *slog.Logger
	Controller attachment_c.AttachmentController
}

Handler Creates http request handler

func NewHandler

func NewHandler(loggerp *slog.Logger, c attachment_c.AttachmentController) *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) List

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

func (*Handler) ListAsSelectOptionByFilter

func (h *Handler) ListAsSelectOptionByFilter(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