caller

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 9 Imported by: 1

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 *sql.Pagination `json:"pagination,omitempty"`
	Error      *ginger.Error   `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