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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalArchiveResponse

func MarshalArchiveResponse(res *usr_s.Customer, w http.ResponseWriter)

func MarshalBanResponse

func MarshalBanResponse(res *usr_s.Customer, w http.ResponseWriter)

func MarshalCreateResponse

func MarshalCreateResponse(res *usr_s.Customer, w http.ResponseWriter)

func MarshalDetailResponse

func MarshalDetailResponse(res *c_s.Customer, w http.ResponseWriter)

func MarshalListAsSelectOptionResponse

func MarshalListAsSelectOptionResponse(res []*customer_s.CustomerAsSelectOption, w http.ResponseWriter)

func MarshalOperationAvatarResponse

func MarshalOperationAvatarResponse(res *c_s.Customer, w http.ResponseWriter)

func MarshalOperationCreateCommentResponse

func MarshalOperationCreateCommentResponse(res *c_s.Customer, w http.ResponseWriter)

func MarshalOperationDowngradeResponse

func MarshalOperationDowngradeResponse(res *c_s.Customer, w http.ResponseWriter)

func MarshalOperationUnbanResponse

func MarshalOperationUnbanResponse(res *c_s.Customer, w http.ResponseWriter)

func MarshalOperationUpgradeResponse

func MarshalOperationUpgradeResponse(res *c_s.Customer, w http.ResponseWriter)

func MarshalUpdateResponse

func MarshalUpdateResponse(res *c_s.Customer, w http.ResponseWriter)

func UnmarshalOperationAvatarRequest

func UnmarshalOperationAvatarRequest(ctx context.Context, r *http.Request) (*c_c.CustomerOperationAvatarRequest, error)

func UnmarshalOperationDowngradeRequest

func UnmarshalOperationDowngradeRequest(ctx context.Context, r *http.Request) (*c_c.CustomerOperationDowngradeRequest, error)

func UnmarshalOperationUnbanRequest

func UnmarshalOperationUnbanRequest(ctx context.Context, r *http.Request) (*c_c.CustomerOperationUnbanRequest, error)

func UnmarshalOperationUpgradeRequest

func UnmarshalOperationUpgradeRequest(ctx context.Context, r *http.Request) (*c_c.CustomerOperationUpgradeRequest, error)

Types

type CustomerOperationCreateCommentRequest

type CustomerOperationCreateCommentRequest struct {
	CustomerID primitive.ObjectID `bson:"customer_id" json:"customer_id"`
	Content    string             `bson:"content" json:"content"`
}

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

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

func (*Handler) OperationArchive

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

func (*Handler) OperationAvatar

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

func (*Handler) OperationBan

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

func (*Handler) OperationChangePassword

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

func (*Handler) OperationChangeTwoFactorAuthentication

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

func (*Handler) OperationCreateComment

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

func (*Handler) OperationDowngrade

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

func (*Handler) OperationUnban

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

func (*Handler) OperationUpgrade

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