Documentation
¶
Index ¶
- func ConvertBatchDynamic[E entities.Entity](entities []*E, responsePrototype any) ([]any, error)
- func ConvertBatchTyped[E entities.Entity, T any](entities []*E) ([]T, error)
- func CopyEntityToResponse[E entities.Entity, R any](entity *E) (R, error)
- func CopyEntityToResponseDynamic(entity any, responsePrototype any) (any, error)
- func NewResponse[R any]() R
- type ErrorResponse
- type ResponseMarker
- type SuccessResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertBatchDynamic ¶ added in v0.3.5
func ConvertBatchTyped ¶ added in v0.3.5
ConvertBatchTyped выполняет пакетное преобразование из []Entity в []T
func CopyEntityToResponse ¶ added in v0.3.5
CopyEntityToResponse копирует данные из entity в resp
func CopyEntityToResponseDynamic ¶ added in v0.3.5
func NewResponse ¶ added in v0.3.5
func NewResponse[R any]() R
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
type ResponseMarker ¶ added in v0.2.10
ResponseMarker - маркерный интерфейс с хуками для кастомной логики
type SuccessResponse ¶
Click to show internal directories.
Click to hide internal directories.