Documentation
¶
Index ¶
- type AfterReceive
- type BeforeSend
- type GisInfo
- type GisProxy
- func (gp *GisProxy) ComputeForwardUrl(incomingRequest *http.Request) (*url.URL, error)
- func (gp *GisProxy) SendRequestWithContext(ctx context.Context, writer http.ResponseWriter, method string, url *url.URL, ...) (*http.Response, error)
- func (gp *GisProxy) ServeHTTP(writer http.ResponseWriter, incomingRequest *http.Request)
- func (gp *GisProxy) SetAfterReceiveFunc(afterReceiveFunc AfterReceive)
- func (gp *GisProxy) SetBeforeSendFunc(beforeSendFunc BeforeSend)
- func (gp *GisProxy) SetNextHandler(next http.Handler)
- func (gp *GisProxy) Start() error
- func (gp *GisProxy) Stop(timeout time.Duration) error
- func (gp *GisProxy) UseHttps(crtfile string, keyfile string)
- type StatusError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AfterReceive ¶
type AfterReceive func(http.ResponseWriter, *http.Response) error
AfterReceive defines after receive callback function
type BeforeSend ¶
type BeforeSend func(http.ResponseWriter, *http.Request) error
BeforeSend defines before send callback function
type GisInfo ¶
GisInfo structure
func GisInfoFromContext ¶
GisInfoFromContext retrives GisInfo from context
type GisProxy ¶
type GisProxy struct {
Prefix string
AllowCrossOrigin bool
// contains filtered or unexported fields
}
GisProxy structure
func GisProxyFromContext ¶
GisProxyFromContext retrives GisProxy from context
func NewGisProxy ¶
NewGisProxy constructs GisProxy
func (*GisProxy) ComputeForwardUrl ¶
ComputeRewriteUrl computes forward url
func (*GisProxy) SendRequestWithContext ¶
func (gp *GisProxy) SendRequestWithContext(ctx context.Context, writer http.ResponseWriter, method string, url *url.URL, body io.Reader, header http.Header) (*http.Response, error)
SendRequestWithContext sends request with context
func (*GisProxy) ServeHTTP ¶
func (gp *GisProxy) ServeHTTP(writer http.ResponseWriter, incomingRequest *http.Request)
ServeHTTP serves rest request
func (*GisProxy) SetAfterReceiveFunc ¶
func (gp *GisProxy) SetAfterReceiveFunc(afterReceiveFunc AfterReceive)
SetAfterReceiveFunc sets AfterReceive callback function
func (*GisProxy) SetBeforeSendFunc ¶
func (gp *GisProxy) SetBeforeSendFunc(beforeSendFunc BeforeSend)
SetBeforeSendFunc sets BeforeSend callback function
func (*GisProxy) SetNextHandler ¶
SetNextHandler sets next handler for middleware use
type StatusError ¶
StatusError struct
func NewStatusError ¶
func NewStatusError(message string, code int) *StatusError
NewStatusError constructs StatusError
func (*StatusError) Error ¶
func (e *StatusError) Error() string
Error implements the error interface