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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalDetailResponse

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

func MarshalListAsSelectOptionResponse

func MarshalListAsSelectOptionResponse(res []*sub_s.OfferAsSelectOption, w http.ResponseWriter)

func MarshalListResponse

func MarshalListResponse(res *sub_s.OfferPaginationListResult, w http.ResponseWriter)

func MarshalUpdateResponse

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

func UnmarshalUpdateRequest

func UnmarshalUpdateRequest(ctx context.Context, r *http.Request) (*sub_s.Offer, error)

func ValidateUpdateRequest

func ValidateUpdateRequest(dirtyData *sub_s.Offer) error

Types

type Handler

type Handler struct {
	Logger     *slog.Logger
	Controller offer_c.Offerontroller
}

Handler Creates http request handler

func NewHandler

func NewHandler(loggerp *slog.Logger, c offer_c.Offerontroller) *Handler

NewHandler Constructor

func (*Handler) GetByID

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

func (*Handler) GetByServiceType

func (h *Handler) GetByServiceType(w http.ResponseWriter, r *http.Request, serviceTypeStr string)

func (*Handler) List

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

func (*Handler) ListAsSelectOptions

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