comments

package
v0.0.0-...-de8c022 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteRequestParam

type DeleteRequestParam struct {
	ID *int `param:"id" validate:"required,gt=0"`
}

type DeleteRequestQuery

type DeleteRequestQuery struct {
	User *string `query:"user" validate:"required"`
}

type GetListRequestQuery

type GetListRequestQuery struct {
	User string `query:"user"`
}

type GetListResponseBody

type GetListResponseBody struct {
	Data []*comment `json:"data"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(db dbT.DB, v *validator.Validate, l *slog.Logger) *Handler

func (*Handler) Add

func (h *Handler) Add(c echo.Context) error

func (*Handler) Delete

func (h *Handler) Delete(c echo.Context) error

func (*Handler) Edit

func (h *Handler) Edit(c echo.Context) error

func (*Handler) ReadList

func (h *Handler) ReadList(c echo.Context) error

type PatchRequestBody

type PatchRequestBody struct {
	Content string `xml:"content" json:"content" form:"content" validate:"required"`
}

type PatchRequestParam

type PatchRequestParam struct {
	ID *int `param:"id" validate:"required,gt=0"`
}

type PatchRequestQuery

type PatchRequestQuery struct {
	User *string `query:"user" validate:"required"`
}

type PostRequestBody

type PostRequestBody struct {
	ParentID  *int    `xml:"parentId" json:"parentId,omitempty" form:"parentId" validate:"omitempty,gt=0"`
	Addressee *string `xml:"addressee" json:"addressee,omitempty" form:"addressee" validate:"required_with=ParentID,omitempty,gt=0"`
	Content   string  `xml:"content" json:"content" form:"content" validate:"required"`
}

type PostRequestQuery

type PostRequestQuery struct {
	User *string `query:"user" validate:"required"`
}

Jump to

Keyboard shortcuts

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