a2r

package
v0.0.50-alpha.127 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 11 Imported by: 4 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call[A, B, C any](c *gin.Context, rpc func(client C, ctx context.Context, req *A, options ...grpc.CallOption) (*B, error), client C, opts ...*Option[A, B])

func ParseRequest added in v0.0.48

func ParseRequest[T any](c *gin.Context) (*T, error)

func ParseRequestNotCheck added in v0.0.48

func ParseRequestNotCheck[T any](c *gin.Context) (*T, error)

Types

type Option added in v0.0.48

type Option[A, B any] struct {
	// BindAfter is called after the req is bind from ctx.
	BindAfter func(*A) error
	// RespAfter is called after the resp is return from rpc.
	RespAfter func(*B) error
}

func NewNilReplaceOption added in v0.0.49

func NewNilReplaceOption[A, B, C any](_ func(client C, ctx context.Context, req *A, options ...grpc.CallOption) (*B, error)) *Option[A, B]

Jump to

Keyboard shortcuts

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