kk_http

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: BSD-3-Clause Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fail

func ReadJson

func ReadJson(stage *kk_stage.Stage, param *any) error

func ReadProtoBuf

func ReadProtoBuf(stage *kk_stage.Stage, ptr proto.Message) error

func RequestForm2Map

func RequestForm2Map(stage *kk_stage.Stage) (queryParameters map[string]string, err error)

func RequestParams2Map

func RequestParams2Map(stage *kk_stage.Stage) (queryParams map[string]string, err error)

RequestParams2Map 解析Get请求的data 返回参数map

func ResponseErrPB

func ResponseErrPB(stage *kk_stage.Stage, err error)

func ResponseFailPB

func ResponseFailPB(stage *kk_stage.Stage, res *kk_models.PBResponse, data proto.Message)

func ResponseProtoBuf

func ResponseProtoBuf(c *gin.Context, obj any)

func ResponseSuccessPB

func ResponseSuccessPB(stage *kk_stage.Stage, res *kk_models.PBResponse, data proto.Message)

func Success

func Success(stage *kk_stage.Stage, res *kk_models.PBResponse, data proto.Message) *kk_models.PBResponse

Types

type KKHttpServer

type KKHttpServer struct {
	Stage           *kk_stage.Stage
	ServerAddr      string
	ShutdownTimeout time.Duration
	// contains filtered or unexported fields
}

func (*KKHttpServer) Engine

func (x *KKHttpServer) Engine() *gin.Engine

func (*KKHttpServer) InitEngine

func (x *KKHttpServer) InitEngine()

func (*KKHttpServer) NewKKRunServer

func (x *KKHttpServer) NewKKRunServer() kk_server.KKRunServer

Directories

Path Synopsis
Package kk_global_stage can only be used for gin framework
Package kk_global_stage can only be used for gin framework

Jump to

Keyboard shortcuts

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