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.Staff, w http.ResponseWriter)

func MarshalCreateResponse

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

func MarshalDetailResponse

func MarshalDetailResponse(res *a_c.Staff, w http.ResponseWriter)

func MarshalOperationAvatarResponse

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

func MarshalOperationCreateCommentResponse

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

func MarshalOperationDowngradeResponse

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

func MarshalOperationUpgradeResponse

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

func MarshalUpdateResponse

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

func UnmarshalOperationAvatarRequest

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

func UnmarshalOperationChangePasswordRequest

func UnmarshalOperationChangePasswordRequest(ctx context.Context, r *http.Request) (*c_c.StaffOperationChangePasswordRequest, error)

func UnmarshalOperationCreateCommentRequest

func UnmarshalOperationCreateCommentRequest(ctx context.Context, r *http.Request) (*c_c.StaffOperationCreateCommentRequest, error)

func UnmarshalOperationDowngradeRequest

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

func UnmarshalOperationUpgradeRequest

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

Types

type Handler

type Handler struct {
	Logger     *slog.Logger
	Controller staff_c.StaffController
}

Handler Creates http request handler

func NewHandler

func NewHandler(loggerp *slog.Logger, c staff_c.StaffController) *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) LiteList

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

type StaffOperationCreateCommentRequest

type StaffOperationCreateCommentRequest struct {
	StaffID primitive.ObjectID `bson:"staff_id" json:"staff_id"`
	Content string             `bson:"content" json:"content"`
}

Jump to

Keyboard shortcuts

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