Versions in this module Expand all Collapse all v0 v0.0.4 Apr 23, 2024 Changes in this version + var DefaultItemPerPage = 25 + var DefaultWithTrashed = false + func Delete[Model any](route string, httpClient http.Client) (Model, error) + func Get[Model any](route string, httpClient http.Client) (Model, error) + func Post[Input any, Model any](route string, httpClient http.Client, input Input) (Model, error) + func Put[Input any, Model any](route string, httpClient http.Client, input Input) (Model, error) + type Filter struct + ItemPerPage int + OrWheres []where.Input + OrderBy orderBy.Input + Page int + Wheres []where.Input + With with.Input + WithTrashed bool + func NewFilter() *Filter + func (f *Filter) AddOrderBy(field string, order string) *Filter + func (f *Filter) FromRouteParams(v url.Values) *Filter + func (f *Filter) Load(names ...string) *Filter + func (f *Filter) OrWhere(name string, compareWith string, compareTo string) *Filter + func (f *Filter) SetItemPerPage(itemPerPage int) *Filter + func (f *Filter) SetPage(page int) *Filter + func (f *Filter) SetWith(w []string) *Filter + func (f *Filter) SetWithTrashed(withTrashed bool) *Filter + func (f *Filter) String() string + func (f *Filter) Where(name string, compareWith string, compareTo string) *Filter + type Pager struct + CurrentPage int + FirstPageUrl string + From int + LastPage int + LastPageUrl string + NextPageUrl string + PerPage int + PrevPageUrl string + To int + Total int + type Response struct + Data Data + Message string + Pager Pager + Status string + func List[Model any](route string, httpClient http.Client, filters *Filter) (*Response[[]Model], error) + func (r *Response[Data]) IsSuccess() bool + type ValidationErrorResponse map[string][]string v0.0.3 Apr 16, 2024 v0.0.2 Nov 3, 2023 v0.0.1 Nov 2, 2023