Documentation ¶
Index ¶
- func CamelToSnake(s string) string
- func Preload(obj any, fields rest.FieldList, q *gorm.DB) (*gorm.DB, error)
- type List
- func (s *List) Prepare()
- func (s *List) Result(pg *gorm.DB, fields rest.FieldNamesList, res any) (count int64, err rest.IErrorArgs)
- func (s *List) ResultAnswer(pg *gorm.DB, fields rest.FieldNamesList, res any, offset, limit int) (*ResultList, rest.IErrorArgs)
- func (s *List) ResultOut(pg *gorm.DB, model any, req rest.IRequestIn) rest.IRequestOut
- func (s *List) ResultOutNames(pg *gorm.DB, fields rest.FieldNamesList, res any, req rest.IRequestIn) rest.IRequestOut
- type ResultList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CamelToSnake ¶
CamelToSnake преобразует строку из CamelCase в snake_case.
Types ¶
type List ¶
type List struct { Conditions rest.ConditionList `json:"Conditions" swagger:"items=$ref:rest.Condition"` Orders []*rest.Order `json:"Orders" swagger:"items=$ref:rest.Order"` Offset int `json:"Offset"` Limit int `json:"Limit"` }
func (*List) Result ¶
func (s *List) Result(pg *gorm.DB, fields rest.FieldNamesList, res any) (count int64, err rest.IErrorArgs)
func (*List) ResultAnswer ¶ added in v1.18.0
func (s *List) ResultAnswer(pg *gorm.DB, fields rest.FieldNamesList, res any, offset, limit int) (*ResultList, rest.IErrorArgs)
func (*List) ResultOut ¶ added in v1.20.1
func (s *List) ResultOut(pg *gorm.DB, model any, req rest.IRequestIn) rest.IRequestOut
func (*List) ResultOutNames ¶ added in v1.20.2
func (s *List) ResultOutNames(pg *gorm.DB, fields rest.FieldNamesList, res any, req rest.IRequestIn) rest.IRequestOut
type ResultList ¶ added in v1.18.0
type ResultList struct { Items []any `json:"Items" rest:"fixed"` Offset int `json:"Offset" rest:"fixed"` Limit int `json:"Limit" rest:"fixed"` Count int64 `json:"Count" rest:"fixed"` }
func (*ResultList) Map ¶ added in v1.20.0
func (s *ResultList) Map(req rest.IRequestIn) (json.Map, rest.IErrorArgs)
func (*ResultList) Out ¶ added in v1.20.1
func (s *ResultList) Out(req rest.IRequestIn) rest.IRequestOut
Click to show internal directories.
Click to hide internal directories.