caller

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response[T any] struct {
	Success    bool               `json:"success"`
	Duration   int64              `json:"duration"`
	Pagination models.IPagination `json:"pagination,omitempty"`
	Error      ginger.IError      `json:"error,omitempty"`
	Data       *T                 `json:"data,omitempty"`
}

func DELETE

func DELETE[T any](ctx *gin.Context, host, path string,
	body interface{}, headers map[string]string) (*Response[T], error)

func GET

func GET[T any](ctx *gin.Context, host, path string,
	params map[string]string, headers map[string]string) (*Response[T], error)

func POST

func POST[T any](ctx *gin.Context, host, path string,
	body interface{}, headers map[string]string) (*Response[T], error)

func PUT

func PUT[T any](ctx *gin.Context, host, path string,
	body interface{}, headers map[string]string) (*Response[T], error)

Jump to

Keyboard shortcuts

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