patient

package
v0.0.0-...-c38fcd0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient() *req.Client

func Request

func Request[T any](req *req.Request, method string, url string) (*T, error)

Types

type ListParam

type ListParam[T any] struct {
	Page    int64 `json:"page"`
	PerPage int64 `json:"perPage"`
	Filter  T     `json:"filter"`
}

type PageResponse

type PageResponse[T any] struct {
	Total     int64 `json:"total"`
	TotalPage int64 `json:"totalPage"`
	Page      int64 `json:"page"`
	PerPage   int64 `json:"perPage"`
	Results   T     `json:"results"`
}

type SuccessResponse

type SuccessResponse[T any] struct {
	Code      int64  `json:"code"`
	Message   string `json:"message"`
	Err       string `json:"err"`
	RequestID string `json:"requestId"`
	Data      T      `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL