Documentation
¶
Index ¶
Constants ¶
View Source
const MAX_SAFE_ITER = 10_000
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InvalidError ¶
type InvalidError struct {
// contains filtered or unexported fields
}
func (InvalidError) Error ¶
func (e InvalidError) Error() string
type Page ¶
func NewPageFromRef ¶
NewPageFromRef creates a new Page from pointers to pageNumber and pageSize. Useful for handling query parameters.
type Result ¶
type Result[T any] struct { Page Page `json:"-"` TotalCount int `json:"totalCount"` Items []T `json:"items"` }
func MapResultErr ¶
func MapResultErr[Out any, In any](resp Result[In], m func(in In) (Out, error)) (Result[Out], error)
MapResultErr is similar to MapResult but it allows the mapping function to return an error.
func (Result[T]) MarshalJSON ¶
Implement json.Marshaler interface to flatten the Page struct
Click to show internal directories.
Click to hide internal directories.