cors

package
v0.0.0-...-78e7222 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodecWithCors

func CodecWithCors(corsDomains []string, originalCodec rpc.Codec) rpc.Codec

construct a new CORS codec

Types

type CorsCodec

type CorsCodec struct {
	CorsDomains     []string
	UnderlyingCodec rpc.Codec
}

func (CorsCodec) NewRequest

func (cc CorsCodec) NewRequest(req *http.Request) rpc.CodecRequest

override exactly one method of the underlying anonymous field and delegate to it.

type CorsCodecRequest

type CorsCodecRequest struct {
	CorsDomains            []string
	UnderlyingCodecRequest rpc.CodecRequest
}

func (CorsCodecRequest) Method

func (ccr CorsCodecRequest) Method() (string, error)

func (CorsCodecRequest) ReadRequest

func (ccr CorsCodecRequest) ReadRequest(req interface{}) error

func (CorsCodecRequest) WriteResponse

func (ccr CorsCodecRequest) WriteResponse(w http.ResponseWriter, reply interface{}, methodErr error) error

override exactly one method of the underlying anonymous field and delegate to it.

Jump to

Keyboard shortcuts

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