Documentation ¶
Index ¶
- Variables
- func AbortWithJsonError(ctx *gin.Context, code int, err error)
- func Close(ctx context.Context, server *http.Server) error
- func EndpointsToMatches(base string, endpoints ...[][3]string) map[string]map[string]string
- func Fs(local string, emFs *embed.FS, emPath string) (http.FileSystem, error)
- func JoinPaths(absolutePath, relativePath string) string
- func MatchOperation(base string, endpoints [][3]string, operations ...string) func(ctx *gin.Context) bool
- func ShouldBind(ctx *gin.Context, obj interface{}, uri, query, body bool) error
- func ShouldBindJSON(c *gin.Context, obj interface{}) error
- func ShouldBindQuery(c *gin.Context, obj interface{}) error
- func ShouldBindUri(c *gin.Context, obj interface{}) error
- func Start(ctx context.Context, server *http.Server, closeTimeout time.Duration) error
- func Value[T any](key string, ctx *gin.Context) (*T, bool)
- func WithHandler(h http.Handler) func(ctx *gin.Context)
- func WithJson[T any](handler func(ctx *gin.Context) (T, error)) func(ctx *gin.Context)
- func WithRecover(message string, handler func(ctx *gin.Context)) func(ctx *gin.Context)
- func WithText(handler func(ctx *gin.Context) (string, error)) func(ctx *gin.Context)
- type Context
- type DataResponse
- type ErrorResponse
- type TagNameFunc
- type TagNameGetter
- type UniverseBinding
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func EndpointsToMatches ¶
func MatchOperation ¶
func ShouldBindJSON ¶
func ShouldBindQuery ¶
func ShouldBindUri ¶
func WithRecover ¶
Types ¶
type DataResponse ¶
type ErrorResponse ¶
type TagNameFunc ¶
type TagNameFunc func(f reflect.StructField) string
func (TagNameFunc) Get ¶
func (f TagNameFunc) Get(field reflect.StructField) string
type TagNameGetter ¶
type TagNameGetter interface {
Get(f reflect.StructField) string
}
type UniverseBinding ¶
type UniverseBinding struct {
// contains filtered or unexported fields
}
func (*UniverseBinding) Bind ¶
func (u *UniverseBinding) Bind(c *gin.Context, obj interface{}) error
func (*UniverseBinding) Name ¶
func (u *UniverseBinding) Name() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.