pickgin

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: BSD-3-Clause Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GinContextType = reflect.TypeOf((*gin.Context)(nil))
)

Functions

func Bind added in v1.15.1

func Bind(ctx *gin.Context, obj any) error

func HandlerWrap added in v1.15.1

func HandlerWrap[REQ, RESP any](service Service[*REQ, *RESP]) gin.HandlerFunc

func HandlerWrapCommon added in v1.15.1

func HandlerWrapCommon[REQ, RESP any](service types.Service[*REQ, *RESP]) gin.HandlerFunc

func Register added in v1.5.1

func Register(engine *gin.Engine, svcs ...pick.Service[gin.HandlerFunc])

func RegisterGrpcService added in v1.8.6

func RegisterGrpcService(engine *gin.Engine, svcs ...pick.Service[gin.HandlerFunc])

func Respond added in v1.15.1

func Respond(ctx *gin.Context, v any)

Types

type RequestSource added in v1.15.1

type RequestSource struct {
	*gin.Context
}

func (RequestSource) Body added in v1.15.1

func (RequestSource) Header added in v1.15.1

func (s RequestSource) Header() kvstruct.ValuesGetter

func (RequestSource) Query added in v1.15.1

func (RequestSource) Uri added in v1.15.1

func (s RequestSource) Uri() kvstruct.Getter

type Service added in v1.15.1

type Service[REQ, RESP any] func(*gin.Context, REQ) (RESP, *httpx.ErrResp)

type Writer added in v1.8.7

type Writer struct {
	*gin.Context
}

func (Writer) HeaderX added in v1.13.14

func (w Writer) HeaderX() httpx.Header

func (Writer) RecordBody added in v1.13.14

func (w Writer) RecordBody(raw []byte, res any)

func (Writer) RespondStream added in v1.12.17

func (w Writer) RespondStream(ctx context.Context, seq iter.Seq[iox.WriterToCloser])

func (Writer) Write added in v1.8.7

func (w Writer) Write(p []byte) (int, error)

func (Writer) WriteHeader added in v1.13.14

func (w Writer) WriteHeader(code int)

Jump to

Keyboard shortcuts

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