Documentation ¶
Index ¶
- Constants
- func Get[RES any](ctx context.Context, requestId string, url string, heades map[string]string) (*RES, error)
- func Patch[RES any](ctx context.Context, requestId string, url string, heades map[string]string, ...) (*RES, error)
- func Post[RES any](ctx context.Context, requestId string, url string, heades map[string]string, ...) (*RES, error)
- func Put[RES any](ctx context.Context, requestId string, url string, heades map[string]string, ...) (*RES, error)
- func RestLogFieldExtractor(c echo.Context) []zapcore.Field
- func Wrapper[TREQ any](wrapped func(context.Context, *TREQ) (*Result, error)) echo.HandlerFunc
- type Delegate
- type GenericResult
- type Pagination
- type PaginationReq
- type Result
Constants ¶
View Source
const RequestObjectContextKey = "service_requestObject"
Variables ¶
This section is empty.
Functions ¶
func RestLogFieldExtractor ¶
Types ¶
type GenericResult ¶
type GenericResult[T any] struct { RequestId string `json:"requestId,omitempty"` Data T `json:"data"` Pagination *Pagination `json:"pagination,omitempty"` }
type Pagination ¶
type Pagination struct {
Total int `json:"total"`
}
type PaginationReq ¶
Click to show internal directories.
Click to hide internal directories.