httputils

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const WindPlayGzipON uint32 = 0xabababab
View Source
const WindPlayGzipOff uint32 = 0xababcccc

Variables

View Source
var GzipMiniSize int32 = 512
View Source
var IsGzipOpen = false
View Source
var WriterPool = sync.Pool{
	New: func() interface{} {
		writer := &GzipWriter{}
		writer.init()
		return writer
	},
}

Functions

func GzipDecode

func GzipDecode(in []byte) ([]byte, error)

func GzipEncode

func GzipEncode(in []byte) ([]byte, error)

func Initialize

func Initialize(openGzip bool, minSize int32)

func Prepare

func Prepare(ctx *gin.Context) (*Request, *Respon)

Types

type GzipWriter

type GzipWriter struct {
	// contains filtered or unexported fields
}

type MessageCachePostHandler

type MessageCachePostHandler interface {
	Handle(userId uint64, form *proto.ST_ResponForm_PB)
}

type MessageCacheProcessHandler

type MessageCacheProcessHandler interface {
	Handle(userId uint64, input map[string]*MessageCacheProcessParam)
}

type MessageCacheProcessParam

type MessageCacheProcessParam struct {
	Bytes       []byte
	Version     uint64
	RepeatTimes uint32
}

type Request

type Request struct {
	// contains filtered or unexported fields
}

func (*Request) Body

func (this *Request) Body() []byte

func (*Request) GetInt32

func (this *Request) GetInt32(key string) int32

func (*Request) GetInt64

func (this *Request) GetInt64(key string) int64

func (*Request) GetString

func (this *Request) GetString(key string) string

func (*Request) GetUint32

func (this *Request) GetUint32(key string) uint32

func (*Request) GetUint64

func (this *Request) GetUint64(key string) uint64

func (*Request) Set

func (this *Request) Set(key, value string)

func (*Request) String

func (this *Request) String() string

type Respon

type Respon struct {
	// contains filtered or unexported fields
}

func (*Respon) Add

func (this *Respon) Add(key string, value interface{})

func (*Respon) AddMap

func (this *Respon) AddMap(in map[string]interface{})

func (*Respon) Send

func (this *Respon) Send()

func (*Respon) SendBody

func (this *Respon) SendBody(body []byte)

Jump to

Keyboard shortcuts

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