Documentation ¶
Index ¶
- func MapOf[T, U any](s []T, f func(T) U) []U
- func MapOfError[T, U any](s []T, f func(T) (U, error)) ([]U, error)
- func MapPointersOf[T, U any](s []T, f func(T) U) []*U
- func MapPointersOfError[T, U any](s []T, f func(T) (U, error)) ([]*U, error)
- func PointersOf[T any](s []T) []*T
- type PageItem
- type PageReader
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapOfError ¶
func MapPointersOf ¶
func MapPointersOf[T, U any](s []T, f func(T) U) []*U
func MapPointersOfError ¶
func PointersOf ¶
func PointersOf[T any](s []T) []*T
Types ¶
type PageReader ¶
type PageReader[T PageItem] struct { Query *gorm.DB After T Limit int Rows []T PrevCount int64 NextCount int64 }
func (*PageReader[T]) EndRow ¶
func (p *PageReader[T]) EndRow() *T
func (*PageReader[T]) Info ¶
func (p *PageReader[T]) Info() *model.PageInfo
func (*PageReader[T]) Read ¶
func (p *PageReader[T]) Read() error
func (*PageReader[T]) StartRow ¶
func (p *PageReader[T]) StartRow() *T
type Resolver ¶
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() generated.MutationResolver
Mutation returns generated.MutationResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() generated.QueryResolver
Query returns generated.QueryResolver implementation.
func (*Resolver) Rule ¶
func (r *Resolver) Rule() generated.RuleResolver
Rule returns generated.RuleResolver implementation.
func (*Resolver) User ¶
func (r *Resolver) User() generated.UserResolver
User returns generated.UserResolver implementation.
Click to show internal directories.
Click to hide internal directories.