jmash

package
v0.0.0-...-6ba990e Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: Apache-2.0 Imports: 24 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowCORS

func AllowCORS(h http.Handler) http.Handler

allowCORS allows Cross Origin Resoruce Sharing from any origin. Don't do this without consideration in production systems.

func FileServeMuxOption

func FileServeMuxOption() runtime.ServeMuxOption

自定义文件下载解析,去掉换行符.

func HealthzServer

func HealthzServer(conn *grpc.ClientConn) http.HandlerFunc

healthzServer returns a simple health handler which returns ok.

func PrintlnProtoReq

func PrintlnProtoReq(protoReq servicepb.FileUploadReq)

func RegisterFileRangeHandler

func RegisterFileRangeHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

注册文件Range下载.

func RegisterFileUploadHandler

func RegisterFileUploadHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

注册文件上传.

func UrlEncodeServeMuxOption

func UrlEncodeServeMuxOption() runtime.ServeMuxOption

注册x-www-form-urlencoded

func XmlServeMuxOption

func XmlServeMuxOption() runtime.ServeMuxOption

注册XML

Types

type FileHttpBodyMarshaler

type FileHttpBodyMarshaler struct {
	runtime.Marshaler
}

自定义文件解析

func (*FileHttpBodyMarshaler) ContentType

func (h *FileHttpBodyMarshaler) ContentType(v interface{}) string

ContentType returns its specified content type in case v is a google.api.HttpBody message, otherwise it will fall back to the default Marshalers content type.

func (*FileHttpBodyMarshaler) Delimiter

func (t *FileHttpBodyMarshaler) Delimiter() []byte

分隔符设置未”,默认换行.

func (*FileHttpBodyMarshaler) Marshal

func (h *FileHttpBodyMarshaler) Marshal(v interface{}) ([]byte, error)

Marshal marshals "v" by returning the body bytes if v is a google.api.HttpBody message, otherwise it falls back to the default Marshaler.

type UrlEncodeMarshal

type UrlEncodeMarshal struct {
	runtime.Marshaler
}

func (UrlEncodeMarshal) ContentType

func (u UrlEncodeMarshal) ContentType(_ interface{}) string

ContentType means the content type of the response

func (UrlEncodeMarshal) Marshal

func (u UrlEncodeMarshal) Marshal(v interface{}) ([]byte, error)

func (UrlEncodeMarshal) NewDecoder

func (u UrlEncodeMarshal) NewDecoder(r io.Reader) runtime.Decoder

NewDecoder indicates how to decode the request

type XMLMarshaler

type XMLMarshaler struct {
	runtime.Marshaler
}

func (XMLMarshaler) ContentType

func (x XMLMarshaler) ContentType(v interface{}) string

func (XMLMarshaler) Marshal

func (x XMLMarshaler) Marshal(v interface{}) ([]byte, error)

func (XMLMarshaler) NewDecoder

func (x XMLMarshaler) NewDecoder(r io.Reader) runtime.Decoder

Directories

Path Synopsis
Package basic is a reverse proxy.
Package basic is a reverse proxy.

Jump to

Keyboard shortcuts

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