Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PaginatedResponse ¶
type PaginatedResponse[T any] struct { TotalCount int `json:"totalCount"` // Total results count Offset int `json:"offset"` // Current page number Size int `json:"size"` // Current page size Data []T `json:"data"` }
func NewPaginatedResponse ¶
func NewPaginatedResponse[T any]() PaginatedResponse[T]
NewPaginatedResponse will initialise the PaginatedResponse; making sure that PaginatedResponse.Data will not be Null
func (*PaginatedResponse[T]) PushData ¶
func (m *PaginatedResponse[T]) PushData(item ...T)
PushData will append item to the PaginatedResponse.Data
func (*PaginatedResponse[_]) UpdateOffset ¶
func (m *PaginatedResponse[_]) UpdateOffset(offset int)
UpdateOffset will update the Offset in PaginatedResponse
func (*PaginatedResponse[_]) UpdateSize ¶
func (m *PaginatedResponse[_]) UpdateSize(size int)
UpdateSize will update the Size in PaginatedResponse
func (*PaginatedResponse[_]) UpdateTotalCount ¶
func (m *PaginatedResponse[_]) UpdateTotalCount(totalCount int)
UpdateTotalCount will update the TotalCount in PaginatedResponse
type QueryParams ¶
type RepositoryRequest ¶
Click to show internal directories.
Click to hide internal directories.