Documentation ¶
Index ¶
- Variables
- func ApiClient(secretKey string, baseUrl string, additionalHeaders ...AdditionalHeader) *req.Client
- func AssertOk[T interface{}](result *req.Response, err error, data *T) (*T, error)
- func AssertOkArray[T interface{}](result *req.Response, err error, data *[]T) ([]T, error)
- func AssertOkMap[T interface{}](result *req.Response, err error, data map[string]T) (map[string]T, error)
- func AssertOkNoBody(result *req.Response, err error) error
- func AssertOkWithoutResult(result *req.Response, err error) error
- func OptionalBool(value bool) *bool
- func ToSort(sortField string, sortDirection string) string
- type AdditionalHeader
- type Lister
- func (lister *Lister[T]) All(opts ...PaginationParamsOption) ([]T, error)
- func (lister *Lister[T]) ListFirstPage(opts ...PaginationParamsOption) (*Page[T], error)
- func (lister *Lister[T]) ListPageAfter(id int64, opts ...PaginationParamsOption) (*Page[T], error)
- func (lister *Lister[T]) ListPageBefore(id int64, opts ...PaginationParamsOption) (*Page[T], error)
- type Page
- type PageFetcher
- type PageJson
- type PaginationParams
- type PaginationParamsOption
- type SeatsioError
- type SeatsioErrorResponse
- type SeatsioErrorTO
Constants ¶
This section is empty.
Variables ¶
View Source
var Pagination paginationNS
Functions ¶
func ApiClient ¶
func ApiClient(secretKey string, baseUrl string, additionalHeaders ...AdditionalHeader) *req.Client
func AssertOkArray ¶
func AssertOkMap ¶
func AssertOkNoBody ¶
func AssertOkWithoutResult ¶
func OptionalBool ¶
Types ¶
type AdditionalHeader ¶
func WithAdditionalHeader ¶
func WithAdditionalHeader(key string, value string) AdditionalHeader
type Lister ¶
type Lister[T interface{}] struct {
PageFetcher *PageFetcher[T]
}
func (*Lister[T]) All ¶
func (lister *Lister[T]) All(opts ...PaginationParamsOption) ([]T, error)
func (*Lister[T]) ListFirstPage ¶
func (lister *Lister[T]) ListFirstPage(opts ...PaginationParamsOption) (*Page[T], error)
func (*Lister[T]) ListPageAfter ¶
func (lister *Lister[T]) ListPageAfter(id int64, opts ...PaginationParamsOption) (*Page[T], error)
func (*Lister[T]) ListPageBefore ¶
func (lister *Lister[T]) ListPageBefore(id int64, opts ...PaginationParamsOption) (*Page[T], error)
type PageFetcher ¶
type PaginationParams ¶
type PaginationParams struct { PageSize *int QueryParams map[string]string QueryParamsArrays map[string][]string }
func (*PaginationParams) AddToArrayQueryParam ¶
func (params *PaginationParams) AddToArrayQueryParam(key string, value string)
type PaginationParamsOption ¶
type PaginationParamsOption func(Params *PaginationParams)
type SeatsioError ¶
func (*SeatsioError) Error ¶
func (m *SeatsioError) Error() string
type SeatsioErrorResponse ¶
type SeatsioErrorResponse struct {
Errors []SeatsioErrorTO `json:"errors"`
}
type SeatsioErrorTO ¶
Click to show internal directories.
Click to hide internal directories.