Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CityInvalidPagination = errors.New("City invalid pagination parameters")
Functions ¶
func EncodeCityCursor ¶
func EncodeCityCursor(cursor *CityCursor) string
Types ¶
type CityConnection ¶
type CityConnection struct {
Edges []CityEdge `json:"edges"`
PageInfo relay.PageInfo `json:"pageInfo"`
TotalCount *int `json:"totalCount"`
}
CityConnection is the connection containing edges of City
func NewCityPage ¶
func NewCityPage(defaultLimit int, first *int, afterCursor *string, beforeCursor *string, paginate CityPaginationFunc) (*CityConnection, error)
func (CityConnection) IsConnection ¶
func (CityConnection) IsConnection()
type CityCursor ¶
CityCursor is the edge representation of City
func DecodeCityCursor ¶
func DecodeCityCursor(cursor string) (*CityCursor, error)
func MustDecodeCityCursor ¶
func MustDecodeCityCursor(cursor string) *CityCursor
func NewCityCursor ¶
func NewCityCursor(offset int, id fmt.Stringer) *CityCursor
type CityPaginationFunc ¶
type Connection ¶
type Connection interface {
IsConnection()
}
type CursorPaginationInput ¶
type CursorPaginationInput struct {
First *int `json:"first"`
After *string `json:"after"`
Last *int `json:"last"`
Before *string `json:"before"`
SortBy []*string `json:"sortBy"`
}
func (*CursorPaginationInput) DecodeParam ¶
func (p *CursorPaginationInput) DecodeParam(param url.Values) url.Values
type PagePaginationInput ¶
type PagePaginationInput struct {
SortBy []*string `json:"sortBy"`
Limit *int `json:"limit"`
Page *int `json:"page"`
}
func (*PagePaginationInput) DecodeParam ¶
func (p *PagePaginationInput) DecodeParam(param url.Values) url.Values
type Pagination ¶
type Pagination struct {
CurrentPage *int `json:"current_page"`
CurrentElements *int `json:"current_elements"`
TotalPages *int `json:"total_pages"`
TotalElements *int `json:"total_elements"`
SortBy *[]string `json:"sort_by,omitempty"`
CursorStart *string `json:"cursor_start,omitempty"`
CursorEnd *string `json:"cursor_end,omitempty"`
}
type ParamCityInput ¶
type ParamCityInput struct {
ID []*int `json:"id"`
}
Click to show internal directories.
Click to hide internal directories.